27404 Parallax Inc, 27404 Datasheet - Page 126

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
Your Turn - Testing All Four
Your SumoBot will eventually need to check and process information from all four IR
object detectors each time through the Main Routine’s
matter of incorporating elements from the IR object detector programs from this activity
and Activity #1 into a single program. If you start with one of the programs, you can
copy the following elements from the other program:
declarations,
After that, all that remains is modifying a couple of
ACTIVITY #6: TESTING ALL SENSORS
This activity combines portions of test code that have already been developed for the
following sensors into one program:
Combining Programs
So far, the SumoBot has seven sensors: 2 QTI line sensors, 4 IR object detectors, and 1
pushbutton. Each has a test program that displays binary values for these sensors, either
one at a time or in pairs. This next example combines them into a master program that
stores the state of each sensor via a series of subroutines, then displays them all with a
single
debugging.
DEBUG
Save a copy of TestSideIrObjectDetectors.bs2 as TestAllIrObjectDetectors.bs2.
Copy all the elements you need from TestFrontIrObjectDetectors.bs2 into your
new program.
Modify the
Test and troubleshoot until you've got it working.
Save the modified program.
Front IR object detectors
Side IR object detectors
Front QTI line sensors
Pushbutton
FREQOUT
command. This can actually be done with minimal additions, effort, and
DEBUG
commands and statements that set variables equal to pin names.
commands to display all the object detection bits.
DEBUG
DO...LOOP
commands.
PIN
. In this case, it's a
directives, variable

Related parts for 27404