28139 Parallax Inc, 28139 Datasheet - Page 44

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
One Timing Change and Lots More IF…THEN
There are two changes you will have to make to 2BitRemoteBoeBot.bs2 to get it to
accommodate this specification. You may have already guessed the first change; the
program will have to make its decisions based on at least three pulses, maybe 4. Take yet
another look at Table 1-1 on page 29. If all you are using to make your decisions are
time(1)
Likewise with the 2 and 6 keys, and so on. To fix this problem, you can use
reasoning based on three pulses. This will cover keys 1 - 8 . The 9 key is still a problem,
but we'll leave that for the Your Turn section.
To measure three data pulses, you will have to make two changes to
2BitRemoteBoeBot.bs2:
Once you've made those changes, here's an
for keys 1-8:
Modify the
two-word array.
Add a third
variable.
Change the Debug Terminal prompt to read "Press and hold a digit key (1-8)…"
and
time(0)
time
PULSIN
, the program could easily mistake the 5 key for the 1 key.
variable declaration so that it's a three-word array instead of a
command to capture a third pulse and store it in the
IF…THEN
statement that will get the job done
Figure 1-16
Numeric Keypad
Control
IF…THEN
time(2)

Related parts for 28139