28139 Parallax Inc, 28139 Datasheet - Page 87

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
The first thing the code in the main routine does is clear the
variables. Then, a
The
key is pressed. As digits are successively entered, the
ten, then the most recent digit stored by
value = value * 10 + remoteCode
PAUSE
Boe-Bot to beep after each digit is entered. It beeps and pauses long enough that the user
lets go of the key. This prevents one press on the 5 key from being received as the value
555.
After the ENTER key is pressed and released, the
number stored by the
DO…LOOP
command follow the
' SONY TV IR remote variables
irPulse
remoteCode
' Main Routine variables
value
DEBUG "The value is: ", DEC value, CR, CR
value = 0
remoteCode = 0
DEBUG "Digits entered: "
DO
LOOP UNTIL (remoteCode = Enter)
value = value * 10 + remoteCode
GOSUB Get_Ir_Remote_Code
IF (remoteCode >= 0) AND (remoteCode <= 9) THEN
ENDIF
FREQOUT Speaker, 100, 3500
PAUSE 200
for keypad entry is conditional, and it executes until the remote's ENTER
DEBUG DEC remoteCode
DEBUG
value
VAR
VAR
VAR
command displays the "Digits entered: " message.
variable is displayed:
GOSUB Get_Ir_Remote_Code
Word
Byte
Word
remoteCode
does. Notice that a
DO…LOOP
is added to value. That's what
value
terminates, and the multi-digit
' Stores multi-digit value
command. This causes the
variable is multiplied by
value
FREQOUT
and
command and
remoteCode

Related parts for 28139