27404 Parallax Inc, 27404 Datasheet - Page 148

COMPETITION RING FOR SUMOBOT

27404

Manufacturer Part Number
27404
Description
COMPETITION RING FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 27404

Accessory Type
Hobby and Education
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
SumoBot®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Page 144· Applied Robotics with the SumoBot
ACTIVITY #1: SERVO CONTROL WITH LOOKUP COMMANDS
Since all the other subroutines in this book have utilized some combination of the
and
variables, why not make it so for servo control subroutines? This
counter
temp
activity demonstrates a way to do it with the
command.
LOOKUP
Servo Control Review
Figure 4-1 is a repeat of Figure 1-4 from Chapter 1, Activity #1. A quick review: The left
servo is connected to header X7 on the SumoBot board. The SumoBot's BASIC Stamp
will send the left servo control signals from I/O pin P13. The right servo is connected to
header X6. The SumoBot's BASIC Stamp will send the right servo control signals from
I/O pin P12.
Figure 4-1 SumoBot Servo Connections
Left
Right
Your PBASIC programs can control each servo’s speed, direction and run-times with
commands inside a
loop. Figure 4-2 shows an example. This
PULSOUT
FOR...NEXT
loop makes the SumoBot's servos turn full speed for one second. The
FOR...NEXT
SumoBot's left servo, which is connected to P13 turns full speed counterclockwise while
its right servo, which is connected to P12, turns full speed clockwise. This combination
of wheel rotations makes the SumoBot travel forward.

Related parts for 27404