This program waits for the touch sensor to be pressed then runs the motor forward until the touch sensor is pressed again to stop the motor.
This is the sub VI for the "Using Sub VIs" example. Runs the motors backwards for two full rotations then stops them.
Important: download the "Using Sub VIs" example, found here, in order to use this to its full demonstrative capability.
This program runs all motors forward until the light sensor reads below 40, this starts the subVI that runs the motors backwards for two full rotations then stops them.
Important: Also download the sub-VI here, or this will not work properly!
This program uses a flat sequence structure to have a car drive forward for four seconds, then using the encoder it should be able to return to its starting position.
This program times how long a while loop iteration takes using a shift a register and displays the value on the NXT screen.
This program uses a while loop and shift register to add 1 to the value of the previous iteration, the value is displayed for one second resulting in the NXT counting by seconds.
This program loops the code that is contained inside a loop for a specified number of iterations.
This program loops the code that is contained inside a loop infinitely. The code inside the loop runs the motor for 2 seconds, then stops the motor. Therefore, this program will run the motor for 2-second intervals, braking between intervals, forever or until the program is stopped.
This program loops the code that is contained inside the loop while the touch sensor is pressed. The code inside the loop runs the motor forward for 2 seconds, then stops the motor. This will continue to run until the touch sensor is released.
This program uses a While Loop as a For Loop. It loops the code that is contained inside for a specified number of iterations. The NXT brick's screen will display the current iteration count.