27404 Parallax Inc, 27404 Datasheet - Page 211
27404
Manufacturer Part Number
27404
Description
COMPETITION RING FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet
1.27404.pdf
(266 pages)
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
- Current page: 211 of 266
- Download datasheet (6Mb)
Chapter #5: Debugging and Datalogging
If the SumoBot exhibits a problem behavior in the ring, figuring out the problem's actual
cause can be rather confounding. Things happen pretty fast in the sumo ring, and it's
often hard to discern what the SumoBot might have "seen" when you're watching a
round. Especially if you extensively modify SumoWrestler.bs2 or add new sensors and
navigation states, you might find yourself relying heavily on the techniques introduced in
this chapter.
SEEING WHAT IT SEES AND UNDERSTANDING WHAT IT DOES
Problem behaviors aren't always confounding. In face, sometimes, it's pretty easy to
guess the cause. In that case, simply using an LED to signal when the suspect part of the
program starts to run will confirm your guess. Other times, you might expect the LED to
come on, but it just doesn't.
At that point you might have to add pieces of code throughout your program that test
other guesses. You may not want these pieces of test code to execute all the time, only
when you tell them to. There's no need to waste variable space or set up a pushbutton
controlled mode though, because the BASIC Stamp Editor supports compiler directives.
These compiler directives are added to the program to make the BASIC Stamp Editor
either include or leave out lines of code. It works both for multiple small statements
scattered throughout the program as well as for really large blocks of diagnostic code.
One really nice thing about compiler directives is you can add the diagnostic code
directly to the actual competition code. By simply changing one value at the beginning
of your program, you can incorporate debugging routines that show every sensor
detection, navigation state and maneuver your SumoBot chooses in slow motion. This
makes it possible to see what it sees, and understand the decisions it makes. Most
importantly, it's not in a separate test program, it's all part of the actual SumoWrestler.bs2
code.
Author's Note
I relied heavily on the techniques in this chapter, especially Activity #3 an #4. They helped
me figure out a number of problems, including program bugs, circuit continuity, and IR
reflected off the floor outside the SumoBot competition ring.
Related parts for 27404
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ 28SSOP
Manufacturer:
Parallax Inc
Datasheet: