Datasheet

Chapter 3 Assemble and Test your BOE Shield-Bot
86Robotics with the BOE Shield-Bot
Testing the Left and Right Wheels
Test the Right Wheel First
The next example sketch will test the servo connected to the right wheel, shown below. The
sketch will make this wheel turn clockwise for three seconds, then stop for one second, then
turn counterclockwise for three seconds.
Example Sketch: RightServoTest
Set the BOE Shield-Bot on its nose so that the drive wheels are suspended above
the ground.
Connect the programming cable and battery pack to the Arduino.
Create and save the RightServoTest sketch, and run it on your Arduino.
Set the 3-position switch to position-2 and press/release the RESET button.
Verify that the right wheel turns clockwise for three seconds, stops for one
second, then turns counterclockwise for three seconds.
If the right wheel/servo does not behave as predicted, see Servo
Troubleshooting, page 88.
If the right wheel/servo does behave properly, then keep going.
/*
* Robotics with the BOE Shield - RightServoTest
* Right servo turns clockwise three seconds, stops 1 second, then
* counterclockwise three seconds.
*/
#include <Servo.h> // Include servo library
Servo servoRight; // Declare right servo
void setup() // Built in initialization block
{
Clockwise 3 seconds
Stop 1 second
Counterclockwise 3 seconds