28139 Parallax Inc, 28139 Datasheet - Page 196

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
Like the example programs in Chapters 2 and 3, there's a
the subroutine waits for the start pulse. Remember that
So, a 3 ms start pulse should result in a
for this start pulse, the loop repeats
StartMin
gives ample room for variations in IR receiver output-low time, probably much more than
can occur due to ambient light conditions.
After the start pulse is received, a
follow. Each time through the
next low pulse. A
range.
irMessage.LOWBIT(counter)
variable that is in the range from
constant defined to be 1200). As with the start pulse, this
a binary-1 low signal that lasts 2 ms. The second case statement checks to see if
irPulse
Bin0Max = 700
If neither those
interference.
program back to the beginning of the subroutine to try again. On the other hand, if the
FOR...NEXT
in the eight bits in the
program to use.
Your Turn - Characters vs. Numeric Byte and Word Values
Since this protocol sends bytes, you can also transmit values between 0 and 255. For
transmitting a sequence of numbers, the TransmitCustomCharacters.bs2 program can be
updated as follows:
is 500, which is a 1 ms pulse. The range it accepts is from
.
NEXT
RETURN
For
StartMax
loop repeated eight times, the
ENDSELECT
Since the message is unreliable, the
.
CASE
GOTO Get_Ir_Byte_Message
example,
SELECT...CASE
statements are true, the message might be the result of outside
and
"trying again...", CR
irMessage
StartMin
CASE
if the
FOR...NEXT
Bin1Min
FOR...NEXT
byte variable, and the result will be ready for the
block decides whether the pulse is 1, 0, or out of
UNTIL irPulse < StartMax AND irPulse >
are constants defined to be 1700 and 1300, which
PULSIN
Bin1Min
PULSIN
CASE
(a constant defined to be 800) to
loop, a
command stored a value in the
statements will either have stored 1 or 0
measurement of 1500. In order to wait
loop decodes the eight bit-pulses that
TO
CASE ELSE
PULSIN
PULSIN
DO...LOOP
Bin1Max
CASE
statement is filtering for
command measures the
measures in 2 µs units.
statement sends the
Bin0Min = 300
stores
at the beginning of
Bin1Max
a
irPulse
1
in
(a
to

Related parts for 28139