28139 Parallax Inc, 28139 Datasheet - Page 48

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
' IR Remote for the Boe-Bot - 3BitRemoteBoeBot.bs2
' Control your Boe-Bot with keys 1-8 on a remote set to control a SONY TV.
'{$STAMP BS2}
'{$PBASIC 2.5}
time
FREQOUT 4, 2000, 3000
DEBUG "Press and hold a digit key (1-8)..."
DO
DO
LOOP UNTIL time(0) > 1000
PULSIN 9, 0, time(0)
PULSIN 9, 0, time(1)
PULSIN 9, 0, time(2)
' Decide which maneuver to execute depending on the combination
' of pulse durations stored in the first three pulse measurements.
IF (time(2) < 500) AND (time(1) < 500) AND (time(0) < 500) THEN
ELSEIF (time(2) < 500) AND (time(1) < 500) AND (time(0) > 500) THEN
ELSEIF (time(2) < 500) AND (time(1) > 500) AND (time(0) < 500) THEN
ELSEIF (time(2) < 500) AND (time(1) > 500) AND (time(0) > 500) THEN
ELSEIF (time(2) > 500) AND (time(1) < 500) AND (time(0) < 500) THEN
ELSEIF (time(2) > 500) AND (time(1) < 500) AND (time(0) > 500) THEN
ELSEIF (time(2) > 500) AND (time(1) > 500) AND (time(0) < 500) THEN
ELSEIF (time(2) > 500) AND (time(1) > 500) AND (time(0) > 500) THEN
RCTIME 9, 1, time(0)
PULSOUT 13, 750
PULSOUT 12, 650
PULSOUT 13, 850
PULSOUT 12, 650
PULSOUT 13, 850
PULSOUT 12, 750
PULSOUT 13, 650
PULSOUT 12, 650
PULSOUT 13, 750
PULSOUT 12, 750
PULSOUT 13, 850
PULSOUT 12, 850
PULSOUT 13, 750
PULSOUT 12, 850
PULSOUT 13, 650
PULSOUT 12, 850
Explain the problem with the 9 key using Table 1-1 as a reference.
VAR
Word(3)
' SONY TV remote variables.
' Start/reset indicator.
' Beginning of main loop.
' Wait for rest between messages.
' Measure/store data pulses.

Related parts for 28139