27404 Parallax Inc, 27404 Datasheet - Page 237

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
ACTIVITY #4: DATALOGGING A COMPETITION ROUND
Displaying values in slow motion while the SumoBot is sitting still won't necessarily
expose or solve problems the SumoBot has when it's up against another SumoBot in the
competition ring. It's also not convenient to try to have a round while the SumoBot is
tethered to the serial cable. Even if it was convenient, the serial communication of all
those characters to the PC takes so much time that it would reduce the servos to twitching
between each message.
This activity introduces a solution to the tether problem. The solution works like this:
Save all the information the previous activity's example program displayed in EEPROM
during the round. After the round is over, connect the SumoBot to the PC again, and
have it display all the SumoBot's sensor readings, navigation states and maneuvers.
Logging and Reporting Routines
Another
example program, the
round), or 2 (display logged round).
' -----[ Compiler Definitions ]-----------------------------------------------
#DEFINE DEBUG_MODE = 1
#DEFINE DATALOG_MODE = 1
Since the same constants and variables that were used for debugging will be used for
datalogging, the conditions of the compiler directives for these constants have to be
updated. For example, the condition for the
DEBUG_MODE = 1
than zero? When
However, when it's set to 1 or 2, the datalogging features should be compiled, and this
includes the extra constants and variables used in the previous activity's debugging
program.
Click Run -> Memory map again and compare how much EEPROM is used by
the code that was added for debugging.
#DEFINE
. Now, it's
can be added to select the various datalogging features. In the next
DATALOG_MODE
DATALOG_MODE
DEBUG_MODE = 1 OR DATALOG_MODE > 0
is set to 0, the datalogging features are not needed.
symbol can be set equal to 0 (no logging), 1 (log
#IF...#THEN
' 0 -> wrestle
' 1 -> display
' 0 -> No log
' 1 -> log round
' 2 -> display log
directive below used to be
. Why greater

Related parts for 27404