Datasheet
Page 14· Applied Robotics with the SumoBot
Figure 1-4 SumoBot Servo Connections
The instructions that make the SumoBot move forward starts with these
PIN declarations:
ServoLeft PIN 13
ServoRight PIN 12
The SumoBot's left servo is connected to P13, so I/O pin P13 is given the name
ServoLeft. Likewise, P12 is connected to the right servo, so it's named ServoRight.
In order for the program to apply 100 pulses, a counter variable is declared:
counter VAR Byte
This FOR...NEXT loop delivers 100 forward pulses to the SumoBot's servos. According
to Robotics with the Boe-Bot, this loop delivers 40.65 pulses per second, so the SumoBot
will roll forward for 100 ÷ 40.65 = 2.46 seconds.
FOR counter = 1 TO 100
PULSOUT ServoLeft, 850
PULSOUT ServoRight, 650
PAUSE 20
NEXT
Your Turn - Does Angle of Approach Matter?
By experimenting with different angles of approach, you might (or might not) find an
even more "winning combination". Figure 1-5 shows examples of two different
approaches. The edge of a SumoBot's plow collides with the flat of the other's (left). The
SumoBot is using a curved approach (right). They aren't necessarily better approaches,
but they are worth investigating for the sake of better understanding the relative merits
and drawbacks of each.