In this setup, a single light sensor is positioned on the robot and programmed to follow the outer-edge of a black line. We commonly refer to the robot executing a 'Z' pattern while following the black line.
Before line following using either the LineFollow2 or LineFollow5 program, you should "calibrate" the light sensor to the actual conditions expected. With the sensor mounted on the robot where it will be used, and the robot placed over the actual line it will be following, a calibration process takes two light sensor readings, one directly over the line (minimum = darkest), and one over the surface away from the line (maximum = brightest).
When programming with loops, you often must access data from previous iterations of the loop in LabVIEW. For example, if you are acquiring one piece of data in each iteration of a loop and must average every five pieces of data, you must retain the data from previous iterations of the loop.
Maybe, we could put the ultrasonic sensor on the NXT. We could put our fingers in front of the sensor right before the race would start. We could program the ultrasonic to go when our fingers are at a certain distance away from teh sensor.
When Roomba knocks into something, its bumper retracts, activating mechanical object sensors that tell Roomba it has encountered an obstacle. It then performs (and repeats) the sequential actions of backing up, rotating and moving forward until it finds a clear path.