70016 Parallax Inc, 70016 Datasheet - Page 29

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
ACTIVITY #3: CAPTURING THE IR MESSAGES
In this activity, you will write programs to measure and capture each pulse in the PWM
message sent by the infrared remote. There are a total of twelve data pulses in a given
message, and each can be captured and stored. By programming the BASIC Stamp to
capture and store these pulses, you will have the key programming ingredient for sending
messages to your Boe-Bot with the handheld remote.
Introduction to Array Variables
Twelve pulse measurements have to be stored separately because they are each a unique
part of the message. Even so, they are related to each other. They are all pulse
measurement values, and they are all going to be examined to determine which key on
the remote is being pressed.
The best way to store a group of related values is with a special kind of variable called an
array variable. An array variable is a group of variables that all have the same name.
Declaring an array variable is similar to declaring most other variables. The only
difference is that a number is added in parentheses next to the
how many variables to create that will share the same name. Here is the syntax for an
array variable declaration:
Here is an example of an array that can store five bytes:
Figure 1-11 shows the five
characters(0)
characters(4)
element has a number called an index (the number inside parentheses) that differentiates
it from the other elements. In other words, each array element variable has the same
name, but a different index number.
Compare this IR message time to the one you calculated by adding up all the IR
message's components.
name
characters VAR Byte(5)
,
. Each of these variables, called array elements, can store a byte. Each
VAR
packet
characters(1)
Size(n)
_
time
=
messages
characters
,
1
/
second
characters(2)
Chapter 1: Infrared Remote Communication · Page 19
variables created by this declaration:
,
characters(3)
Size
argument that tells
,
and

Related parts for 70016