Page 102 · Robotics with the Boe-Bot
Back
Testing the Right Wheel
The next example program will test the servo connected to the right wheel, shown in
Figure 3-14. The program will make this wheel turn clockwise for three seconds, then
stop for one second, then turn counterclockwise for three seconds.
Clockwise 3 seconds
Counterclockwise 3 seconds
Example Program: RightServoTest.bs2
√
Set the Boe-Bot on its nose so that the drive wheels are suspended above ground.
√
Reload the batteries into the battery pack.
√
If you have a Board of Education Rev C, set the 3-position switch to position-2.
√
If you have a BASIC Stamp HomeWork Board, connect the 9 V battery to the
battery clip.
√
Enter, save, and run RightServoTest.bs2.
√
Verify that the right wheel turns clockwise for three seconds, stops for one
second, then turns counterclockwise for three seconds.
Left
Right
Stop 1 second
Figure 3-13
Your Boe-Bot
Front
robot's Front, Back,
Left, and Right
Figure 3-14
Testing the Right
Wheel