Parallax Boe-Bot Student Manual page 187

Hide thumbs Also See for Boe-Bot:
Table of Contents

Advertisement

' {$PBASIC 2.5}
DEBUG "WHISKER STATES", CR,
"Left
Right", CR,
"------
------"
DO
DEBUG CRSRXY, 0, 3,
"P5 = ", BIN1 IN5,
"
P7 = ", BIN1 IN7
PAUSE 50
LOOP
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.
What is
CRSRXY
It is a formatter that allows you to conveniently arrange information your program sends to
the Debug Terminal. The formatter
DEBUG CRSRXY, 0, 3,
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.
Chapter 5: Tactile Navigation with Whiskers · Page 173
?
CRSRXY 0, 3,
"P5 = ", BIN1 IN5,
"
P7 = ", BIN1 IN7
' PBASIC directive.
in the command

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Boe-Bot and is the answer not in the manual?

Table of Contents

Save PDF