CHAPTER 25 ■ LAUNCHING THE LINE-FOLLOWER
If the indicator LEDs are lighting up the opposite way, you can either start calling them “darkness”
indicators (no, don’t do that) or swap the comparator outputs to the transistors.
Checking the Motors
- Prop the robot on top of something so that the wheels don’t touch the ground. An
unused container is perfect for this. - Flip the line-following switch to either side to enable the motors. Move your
hand back and forth under the sensors to verify each motor is able to turn.
If neither motor turns, check the motor connectors, motor wiring, and line-following switch. If both
motors always turn and stop at the same time (rather than alternating), check the connections to the line-
following switch. If one motor turns and stops, but the other motor doesn’t turn at all, check the failed
motor’s connector and wiring.
Another possibility is that the battery is weak or that the custom motors you picked require more power
than a 9 V battery can supply. As a test, you can wire an LED and 1 kW resistor to a Molex connector to
temporarily replace each motor. If the LEDs light, then the battery or motor are most likely to blame.
Due to the variety of battery chemistries, it is difficult to specify an exact voltage at which a 9 V battery
would be considered “dead.” Instead, it is easiest to swap in a fresh battery for test purposes.
- Put a short piece of tape on the sides of each wheel. This will help you to be able
to see in which direction the motors are turning. - Place your hand under the left or right sensors to make the left motor spin.
The left motor should spin counter-clockwise (see Figure 25-1).
Figure 25-1. The robot’s left motor spins counter-clockwise. Notice the extra container underneath the robot
keeping the wheels off the ground
- Place your hand under the opposite set of sensors so that the right motor spins.
The right motor should spin clockwise (see Figure 25-2).