Page 124 ·
Robotics with the Boe-Bot
Figure 4-1
Your Boe-Bot and
Driving Directions
Moving Forward
Here’s a funny thing: to make the Boe-Bot go forward, the Boe-Bot’s left wheel has to
turn counterclockwise, but its right wheel has to turn clockwise. If you haven’t already
grasped this, take a look at Figure 4-2 and see if you can convince yourself that it’s true.
Viewed from the left, the wheel has to turn counterclockwise for the Boe-Bot to move
forward. Viewed from the right, the other wheel has to turn clockwise for the Boe-Bot to
move forward.
Figure 4-2
Wheel
Rotation for
Forward
Motion
Left Side
Right Side
Remember from Chapter 2 that the
PULSOUT
command’s
Duration
argument controls
the speed and direction the servo turns. The
StartValue
and
EndValue
arguments of a
FOR…NEXT
loop control the number of pulses that are delivered. Since each pulse takes
Forward
Counterclockwise
Forward
Clockwise
Forward
Backward
Left Turn
Right Turn