70016 Parallax Inc, 70016 Datasheet - Page 67

TEXT INFRARED REMOTE FOR BOE-BOT

70016

Manufacturer Part Number
70016
Description
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 70016

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Boe-Bot®
For Use With
29122 - KIT PARTS IR REMOTE FOR BOE-BOT
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
70016SE
Manufacturer:
ST
0
Advanced Topic – How PulsesToByteValue.bs2 Works
A label named
next example program. The routine in the main
decodes the data bit pulses from the IR remote.
command coupled with an
pulse. If the pulse measurement is not the correct duration for a start pulse, it might be
interference from a glitch in the IR detector's output, interference that can be generated
by some fluorescent lights, or perhaps a nearby remote is being used to control a different
brand of TV, VCR, etc. In any of these cases, if the pulse measurement is out of range, a
GOTO
the program to restart the routine at the
checking for incoming SONY TV protocol IR messages.
PulsesToByteValue.bs2 uses a variable named
decoding all the IR message pulses. This simplifies the
follow each
variable if the pulse duration measurement is greater than 300. If it's less than 300, the
bit should be 0, but since all bits in the variable were pre-set to 0, the
statement doesn't need to take any action. The easiest way to clear all the bits in a
variable is by simply setting it equal to zero. If a byte variable stores the value 0, it's
really storing the binary number 00000000. In effect, all the bits are set to zero.
The
in the program that waits for a start pulse from the remote. More specifically, it looks for
a signal that stays high for longer than 2 ms before it transitions from high to low. When
it finds a signal that stays high for longer than 2 ms, it assumes the 20 to 30 ms resting
state between messages has ended, and the start pulse has begun. Either that, or there has
been a long period of time between button presses, and finally, after many repetitions of
the
finally decided to press a button. Another function of this loop is to discard the 0.6 ms
high times between low data bit pulses and synchronize with the end of the resting state
between messages.
DO...LOOP
DO...LOOP
command in the
remoteCode = 0
DO
LOOP UNTIL time > 1000
Get_Pulses:
RCTIME 9, 1, time
RCTIME
, it has detected a new message because the person holding the remote has
Get_Pulses
below was introduced in Chapter 1, Activity #5. It's the first gate keeper
measurement because they only have to set a bit in the
IF...THEN
is added at the very beginning of the main
IF...THEN
statement that checks the pulse measurement will send
Get_Pulses
statement will check the duration of the start
remoteCode
' Label to restart message check
DO...LOOP
label, so that the routine can keep
Later in the routine, an
IF...THEN
to store the result of
captures, records and
DO...LOOP
statements that
remoteCode
IF...THEN
RCTIME
in the

Related parts for 70016