28125 Parallax Inc, 28125 Datasheet - Page 187

TEXT ROBOTICS

28125

Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet

Specifications of 28125

Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
' {$PBASIC 2.5}
DEBUG "WHISKER STATES", CR,
DO
LOOP
DEBUG CRSRXY, 0, 3,
PAUSE 50
"Left
"------
Note the values displayed in the Debug Terminal; it should display that both P7
and P5 are equal to 1.
Check Figure 5-5 on page 169 (or Figure 5-6 on page 170) so you know which
whisker is the “left whisker” and which whisker is the “right whisker”.
Press the right whisker into its three-pin header, and note the values displayed in
the Debug Terminal. It should now read:
P5 = 1 P7 = 0
Press the left whisker into its three-pin header, and note the value displayed in
the Debug Terminal again. This time it should read:
P5 = 0 P7 = 1
Press both whiskers against both three-pin headers. Now it should read
P5 = 0 P7 = 0
If the whiskers passed all these tests, you’re ready to move on; otherwise, check
your program and circuits for errors.
"P5 = ", BIN1 IN5,
"
What is
It is a formatter that allows you to conveniently arrange information your program sends to
the Debug Terminal. The formatter
places the cursor at column 0, row 3 in the Debug Terminal. This makes it display nicely
below the “Whisker States” table heading. Each time through the loop, the new values
overwrite the old values because the cursor keeps going back to the same place.
P7 = ", BIN1 IN7
CRSRXY
Right", CR,
------"
DEBUG CRSRXY, 0, 3,
?
"P5 = ", BIN1 IN5,
"
P7 = ", BIN1 IN7
CRSRXY 0, 3,
' PBASIC directive.
in the command

Related parts for 28125