28139 Parallax Inc, 28139 Datasheet - Page 88

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
Your Turn – Processing Only Digits and Enter
If you were to design a product with a BASIC Stamp and a universal remote, you might
get some complaints from customers if you use EnterLargeValues.bs2 without some extra
work. The program needs to ignore non-digit keys such as POWER and VOL+ . Pressing
these keys can lead to some pretty crazy values.
Try entering non-digits with your unmodified version of EnterLargeValues.bs2.
Save the program as EnterLargeValuesYourTurn.bs2.
Replace the
DO
LOOP
DEBUG "Type a value (up to 65535)", CR, "Then press ENTER", CR, CR
value = 0
remoteCode = 0
DO
LOOP UNTIL (remoteCode = Enter)
DEBUG CR, "The value is: ", DEC value, CR, CR
value = value * 10 + remoteCode
DO
LOOP
GOSUB Get_Ir_Remote_Code
IF (remoteCode < 10) THEN
ELSEIF (remoteCode = Enter) THEN
ELSE
ENDIF
DEBUG "You pressed: ", DEC1 remoteCode, CR
GOSUB Beep_Valid
EXIT
DEBUG "You pressed: ENTER", CR
GOSUB Beep_Valid
EXIT
DEBUG "Press 0-9 or ENTER", CR
GOSUB Beep_Error
DO…LOOP
in the main routine with this one:

Related parts for 28139