28139 Parallax Inc, 28139 Datasheet - Page 65

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
ms high time between messages.
remains of the start pulse. An
sure the
that range, the
routine to try again.
Since none of the
one is followed by another
pulse. For the data bit pulses, each
statement that uses 300 as a threshold to correctly decide whether the time measurement
indicates a binary-1 or a binary-0.
Let's try the example program, and then take a closer look at how the
and
Example Program: PulsesToByteValue.bs2
This program demonstrates the concepts that have been introduced thus far by decoding
the remote's PWM message and displaying it as a decimal value. Any time you need to
know what the code for one of the remote keys is, you can use this program. When you
know what each code in the remote's keypad is, writing programs that make the Boe-Bot
act on the PWM messages it receives using
easier.
IF...THEN
Enter and run PulsesToByteValue.bs2.
Press the various remote keys and find out what each decimal value is.
Test the 1 through 9 keys and explain the relationship between the decimal value
displayed in the Debug Terminal and the value of the number on the keypad.
Try the 0 key. Does the value for the zero key present a programming problem?
Compare the binary version of the
Terminal against your entries in Table 1-1 on page 29. If a given bit in the
remoteCode
Table 1-1 should be above 500. If the bit in
value in the
RCTIME
DO...LOOP
IF...THEN
statements find and verify the start pulse and decode the data bit pulses.
measurement is within a range that confirms a start pulse. If it's not in
IF...THEN
time(index)
repeats an
variable is 1, the corresponding
RCTIME
statement sends the program back to the beginning of the
statements finish until after the next low pulse begins, each
IF...THEN
RCTIME
measurement should be below 500.
command that measures what's left of the next low
Then, another
RCTIME
command until it detects the end of the 20 to 30
statement with two conditions checks to make
remoteCode
IF…THEN
command is followed by an
remoteCode
RCTIME
and
variable displayed in the Debug
time(index)
SELECT…CASE
command measures what
is 0, the corresponding
RCTIME
measurement in
becomes much
IF...THEN
commands

Related parts for 28139