CHAPTER 25 ■ LAUNCHING THE LINE-FOLLOWER
The first frame shows the robot perfectly centered over the black line. Both sets of sensors see white
floor with a bit of black at the inner edge. The overall brightness is balanced, so both sets of LEDs and motors
are enabled.
But floors, tires, and motors are naturally uneven. Eventually the robot drifts off course.
The second frame shows that the robot has drifted and that the black line is beneath the right-side set of
sensors. That means the left side is brighter, so the left LEDs and motor kick in and the right LEDs and motor
are disabled. With only the left motor spinning, the robot’s left side will rotate toward the line.
At some point the sensors become balanced again, but because the left side is already in motion, the
robot overshoots the line a little before the right motor can come up to speed.
The third frame shows that the robot has overshot and that the black line is now beneath the left set
of sensors. That means the right side is brighter, so the right LEDs and motor kick in and the left LEDs and
motor are disabled. With only the right motor spinning, the robot’s right side will rotate toward the line.
This pattern repeats over and over very quickly but without such radical overshoots in reality. That’s
how the robot keeps centered over the line!
Following a Light Line
Figure 25-8 consists of three frames showing the motion of the robot following a light line. The robot’s angles
in these pictures are exaggerated for illustrative purposes.
Figure 25-7. Composite photograph of exaggerated movements of the robot following a dark line