27404 Parallax Inc, 27404 Datasheet - Page 215

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
If the LED doesn't flicker, there may be an object in front of the SumoBot, or there could
be a branching problem. To test to find out if there is an object in front of the Boe-Bot,
try moving the LED test to the
then it confirms the problem.
Track_Front_Left_Object
Testing for Branching Problems
IF...THEN
can cause the code to skip from one "branch" of the program to another. If a program has
a branching problem, it would be because a command is telling the program to skip to a
place you don't want it to go to.
Let's say this is the real bug in the program is in the Main Routine. In the code block
below, the programmer typed
the correct response to the first
Track_Side_Right_Object
LOOP
LOW LedSpeaker
RETURN
GOSUB Servos_And_Sensors
Run the modified program with the SumoBot's 3-position power switch set to 1.
Make sure no objects are in view of the SumoBot's other three object detectors.
Wave your hand in front of the right object detector.
Verify that the LED blinks and the speaker clicks rapidly until you wave your
hand in front of one of the front IR detectors.
Try it in the practice ring with the 3-position power switch set to 2.
Start your test SumoBot, again, with its opponent on the right.
Press/release the Reset button, and verify that the LED flickers and the speaker
clicks as it rounds on its opponent.
Leave the LED code where it is for the next test.
,
GOTO
,
GOSUB
, and
and
GOSUB Track_Side_Left_Object
subroutine.
Go_Forward subroutine
ELSEIF
RETURN
Track_Front_Right_Object
This test would also have to be repeated for the
, but the second
are all examples of branching commands. They
' <--- Add
ELSEIF
. If the LED flickers constantly,
code block should call the
subroutines.
twice by accident. It's

Related parts for 27404