122-27400 Parallax Inc, 122-27400 Datasheet - Page 28

MANUAL FOR SUMOBOT

122-27400

Manufacturer Part Number
122-27400
Description
MANUAL FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 122-27400

Accessory Type
Manual
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 18 · SumoBot – Mini Sumo Robotics
Hold_Position:
As soon as the program is downloaded, remove the programming cable from the
SumoBot. This program runs through key motion tests, and then stops the SumoBot.
When the SumoBot stops moving after its final spin, move the power switch to position 0
(off). If it doesn't move at all, you may have set the power switch to position 1. You
don't have to download the program again if this happened; simply move the power
switch to position 2 and then press the Reset button to restart the program.
HOW IT WORKS
This program code starts – as well-coded programs do – by defining connection and
value constants used in the program. This methodology creates programs that are easier
to read, maintain, and debug. In the case of the SumoBot, the motor connections are on
pins 13 (left) and 12 (right). For robot Sumo, we don't need infinite speed control;
simply stop, slow and fast (these are relative terms, and will vary from servo type to
servo type). Speed constants for each motor are defined and can be tuned for motor
variances and when changing motor types.
The initialization section (labeled Reset as this is the first code that runs after the
SumoBot is reset) ensures that the motor control outputs are setup to provide the correct
pulse polarity to the servos, and then introduces a two-second delay to allow the
programming cable to be removed from the SumoBot.
SumoBot while doing any movement testing.
FOR pulses = 1 TO 55
NEXT
DO
LOOP
END
PULSOUT LMotor, LFwdFast
PULSOUT RMotor, RRevFast
PAUSE 20
PULSOUT LMotor, LStop
PULSOUT RMotor, RStop
PAUSE 20
' spin turn - clockwise
It's best to disconnect the

Related parts for 122-27400