Move Forward, Wait, Move Reverse

You will need an NXT car with two motors. Attach one motor to Port A and
the other motor to Port C.
- Write a program exactly like the one above. Make sure to change both
Move blocks to Ports A and C. Set the Duration of each Move block to 2
seconds. The second Move block should have the Direction set to Reverse.
- Run the program, and observe the behavior of the NXT car.
- Change the amount of time that your car moves forward and backward.
- Run the changed program and again, note the behavior of the NXT car.
Wait For Touch
You will need an NXT car with two motors and a touch
sensor. Attach one motor to Port A and the other motor to Port C.
Attach the touch sensor to Port 1.
- Write a program exactly like the one above. Make sure to change the
Move block to Ports A and C. Set the Duration of the Move block to 2
seconds. The Wait block should be set to wait for the touch sensor to be
pressed.
- Run the program, and observe the behavior of the NXT car when you
press the touch sensor.
- Change the Wait block to wait for the touch sensor to be bumped
(pressed and released once).
- Run the changed program and again, note the behavior of the NXT car.
Loop

You will need an NXT car with two motors and a touch
sensor.
Attach one motor to Port A and the other motor to
Port C. Attach the touch sensor to Port 1.
- Write a program exactly like the one above. Make sure to change the
Move block to Ports A and C. Set the Duration of the Move block to 2
seconds. The Wait block should be set to wait for the touch sensor to be
pressed. The loop should continue forever.
- Run the program, and observe the behavior of the NXT car when you
press the touch sensor.
- Press the touch sensor again, and observe the behavior of the NXT
car. How many times do you think the car will perform this same behavior
when the touch sensor is pressed?
- Run the changed program and again, note the behavior of the NXT car.
Change Direction with Touch Sensor

You will need an NXT car with two motors and a touch
sensor.
Attach one motor to Port A and the other motor to
Port C. Attach the touch sensor to Port 1.
-
Write a program exactly like the one above. Make
sure to change the Move blocks to Ports A and C. Set the Duration of
both Move blocks to Unlimited. The second Move block should have the
direction reversed. The Wait blocks should be set to wait for the touch
sensor to be pressed. The loop should continue forever.
- Run the program, and observe the behavior of the NXT car when you
press the touch sensor.
- Press the touch sensor again, and observe the behavior of the NXT
car. What has changed?
- Keep the program running, and continue to press the touch sensor
multiple times. You have made the touch sensor into a toggle switch for
the direction of the motors of your car!