27404 Parallax Inc, 27404 Datasheet - Page 220

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
DO
LOOP
Your Turn - Conditionally Compiling LED Commands
In Activity #1, you inserted four different PBASIC commands to make the LED notify
you of certain events. One command was added to the Main Routine, another to the
Servos_And_Sensors
Track_Side_Right_Object
ACTIVITY #3: DEBUGGING PROBLEM BEHAVIORS
LED tests can provide a quick indication of what's happening in a certain place in a
SumoBot's program, but that's about all it can do. In other words, the scope of LED tests
tend to be somewhat limited.
This activity introduces a Debug Terminal diagnostic tool with a much broader scope.
You can use it to watch all the sensors, navigation states and maneuvers the SumoBot
DEBUG CRSRX, 0, ? counter
counter = counter + 1
#IF LED_MODE = 1 #THEN
#ELSE
#ENDIF
DEBUG "LED state = ", BIN1 counter.BIT0, CRSRUP
TOGGLE LedSpeaker
PAUSE 200
DEBUG "LED_MODE disabled", CRSRUP
PAUSE 100
Reopen the CompCodeLedTest.bs2 from this chapter's activity #1
Insert a
Nest the LED test commands into
for each compiles its code based on a different value of
and 3. Then, if you declare
be compiled.
Test your program.
#DEFINE LED_MODE
subroutine,
subroutine.
LED_MODE
declaration at the beginning of the program.
and
#IF...#THEN
two
to be 0, none of the LED test codes will
commands
blocks. Make sure that the test
LED_MODE
were
added
, such as 1, 2,
to
the

Related parts for 27404