Question 6: Go back to the instruction book and add the touch sensor. Write a program to go forward until the touch sensor is pressed and then go backward. You can use wait for time or wait for rotation to determine how far backward to go.
|
Problem 6 demonstrates the use of a touch sensor. Note that the NXT touch sensors have axle holes in them making it easy to extend the touch sensor into a much bigger bumper. After the touch sensor is pressed, the motors should go backwards. As the motor goes backward, the sensor will count backward. If you use a wait for rotation icon, it will reset to zero and you will need to wait for a negative number of degrees. |
|
|