70016 Parallax Inc, 70016 Datasheet - Page 37

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
The code block in the this
larger than 2 ms, which means it must be the resting state between IR messages.
When the
deciding what to do next, the remote is sending the start pulse. This is the perfect time to
line up twelve
loaded into separate array elements. These twelve
how constant values such as 0, 1, 2 through 11 can be used to index elements in an array.
Next is an example of another way to index array elements, with a variable. In this case,
the variable is
argument in the
increases by one each time through the
value stored by each successive element in the
loop, the
time(1)
LOOP
, and so on.
DO
LOOP UNTIL time(0) > 1000
PULSIN 9, 0, time(0)
PULSIN 9, 0, time(1)
PULSIN 9, 0, time(2)
PULSIN 9, 0, time(11)
FOR index = 0 TO 11
NEXT
DEBUG
PULSIN
PULSIN 9, 1, time(0)
DEBUG CRSRXY, 0, 4 + index, "time(", DEC index, ")",
index
PULSIN
DEBUG
command displays
CRSRXY, 9, 4 + index, DEC time(index), CLREOL
command finishes measuring the resting pulse and the program is
, and it is incremented each time through a
commands to catch the twelve data pulses. Notice how each is
command is
DO…LOOP
keeps measuring high pulses until it finds one that's
FOR…NEXT
time(0)
DEC time(index)
Chapter 1: Infrared Remote Communication · Page 27
, the second time through, it displays
time
loop, the
PULSIN
array. The first time through the
. Since the value of
DEBUG
commands also demonstrate
FOR…NEXT
command displays the
loop. The last
index

Related parts for 70016