CHAPTER 25 ■ LAUNCHING THE LINE-FOLLOWER
The robot proceeds in the same manner as it did for following a dark line. The vital difference is that the
line-following switch has swapped the motor wires.
The first frame shows the robot centered, with the sensors balanced. Both sets of LEDs and motors
are enabled.
The second frame shows the robot has drifted and that the white line is beneath the right-side set of
sensors. That means the right side is brighter, so the right set of LEDs are enabled, but the line-following-switch
swap causes the left-side motor to engage. The left side of the robot will rotate toward the line. If the right motor
had been engaged instead, the robot would have continued moving off course.
The third frame shows the robot has overshot and that the white line is beneath the left set of sensors.
That means the left side is brighter, so the left set of LEDs are enabled, but the line-following-switch swap
causes the right-side motor to engage. The right side of the robot will rotate toward the line.
Very sneaky!
The Maiden Voyage
After you have checked the robot over and calibrated, it’s time for the maiden voyage.
Laying out a track with masking tape is fun, because you can rapidly extend the course or quickly make
changes to turns or intersections. Oval or “8” shaped courses allow you to sit back and admire your work,
rather than having to pick up the robot and return it to the starting line.
Forks and splits in the road are interesting. Obviously the robot isn’t making an intelligent decision
about which road to take, but it’s entertaining to alter the split until the robot starts taking different branches
at random.
Don’t forget to add tunnels to drive through or block walls to knock down. Hang bells on strings for the
robot to ring as it drives by. Maybe a finish line?
Figure 25-8. Composite photograph of exaggerated movements of the robot following a light line