28139 Parallax Inc, 28139 Datasheet - Page 101

KIT REMOTE IR FOR BOE-BOT W/TEXT

28139

Manufacturer Part Number
28139
Description
KIT REMOTE IR FOR BOE-BOT W/TEXT
Manufacturer
Parallax Inc
Datasheets

Specifications of 28139

Accessory Type
IR Remote
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Boe-Bot®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
How KeypadDirectionDistance.bs2 Works
Two variables have to be added to IrRemoteKeypad.bs2, one for storing the Boe-Bot's
direction, and the other for counting the number of pulses in a
The first command inside the main
CH/VOL direction.
The program calls the
remoteCode
some button that's not CH+/- or VOL+/- is pressed, the
lower pitched error beep along with a Debug Terminal prompt to press one of the CH or
VOL buttons.
After the
Bot with the remote is stored in the
in a different variable before another IR message is processed; otherwise, the value will
be lost. That's why the direction value stored in
variable, which is conveniently named
The right button had to have been pressed for the program to have exited the
that calls the
which makes the higher pitched acknowledgement beep to let you know the right key was
pressed.
' Boe-Bot navigation variables
direction
counter
Get_Ir_Remote_Code
DEBUG "Select direction (CH/VOL):", CR
DO
LOOP UNTIL (remoteCode >= ChUp) AND (remoteCode <= VolDn)
direction = remoteCode
GOSUB Get_Ir_Remote_Code
IF (remoteCode < ChUp) OR (remoteCode > VolDn) THEN
ENDIF
that falls between
Get_Ir_Remote_Code
DEBUG "Select direction (CH/VOL):", CR
GOSUB Beep_Error
Get_Ir_Remote_Code
VAR
VAR
ChUp
subroutine is called, the direction you sent to the Boe-
Byte
Byte
remoteCode
(16) and
. The program calls the
DO…LOOP
direction
VolDn
subroutine over and over again, until a
is a
remoteCode
variable. This value needs to get stored
.
(19) is received from the remote. If
DEBUG
IF…THEN
command prompting for a
FOR…NEXT
has to be copied to another
Beep_Valid
statement delivers the
loop.
subroutine,
DO…LOOP

Related parts for 28139