27404 Parallax Inc, 27404 Datasheet - Page 135

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
Figure 3-22 shows an example of how these modified routines display the contents of the
sensors
DEBUG CRSRXY, 0, 4
row is row 0) right inside the display heading built by the Initialization
BIN8 sensors
to view each bit, and therefore the status of each sensor’s I/O pin
The bit pattern in Figure 3-22 indicates that the left and right front IR detectors see an
object, making it a good time for your SumoBot to lunge forward. In the next chapter,
your programs will examine this variable, sometimes for patterns, and other times for
changes in certain groups of bits.
DEBUG CRSRXY, 0, 4, BIN8 sensors
Save SensorsWithFlagsByte.bs2 as SensorsByteDisplay.bs2.
Replace the Initialization and Main Routine with the ones above.
Save and run the program.
byte. But first let’s look at this line for a moment:
displays the value of
, places the Debug Terminal cursor at column 0, row 4 (the top
sensors
as an 8-digit binary number, allowing us
Figure 3-22
The sensors Byte
The left front (LF) and
right front (RF)
infrared object
detectors (IROD)
have detected
objects
.
DEBUG
command.

Related parts for 27404