28139 Parallax Inc, 28139 Datasheet - Page 31

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
' IR Remote for the Boe-Bot - ArrayExample.bs2
' Set array element values with DEBUGIN and display them with DEBUG.
' {$STAMP BS2}
' {$PBASIC 2.5}
characters
index
FOR index = 0 TO 4
NEXT
DEBUG CR, "You typed: "
FOR index = 0 TO 4
NEXT
END
How ArrayExample.bs2 Works
An array of five bytes named
index
A
times. Each time through, the value of
command stores the character in the next array element.
DEBUG "Type character(", DEC index, ") "
DEBUGIN characters(index)
DEBUG CR
DEBUG characters(index)
FOR…NEXT
.
Enter and run ArrayExample.bs2.
Click the Debug Terminal's Transmit Windowpane.
Type five letters.
When the Debug Terminal displays "You typed: …", verify that the BASIC
Stamp has sent back the same characters you entered.
characters
index
FOR index = 0 TO 4
NEXT
DEBUG "Enter character(", DEC index, ") "
DEBUGIN characters(index)
DEBUG CR
loop repeats the code block between the
VAR
VAR
VAR
VAR
Byte(5)
Nib
characters
Byte(5)
Nib
index
is declared along with a nibble variable named
Chapter 1: Infrared Remote Communication · Page 21
is incremented by 1, so the
FOR
and
NEXT
statements five
DEBUGIN

Related parts for 28139