28139 Parallax Inc, 28139 Datasheet - Page 62

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
A
representation of the
by the first prompt for the user (you) to enter a digit.
The value of
command, which displays a second prompt. Then a second
value of
This code block stores the value of
The series of
found, the corresponding bit in
Next,
the screen is cleared, and the new binary representation of the
displayed.
Your Turn – Adding Decimal Conversion to the Program
This program can also be a useful tool for examining the relationship between binary and
decimal numbers.
DEBUG CLS
PAUSE 500
DEBUG CLS,
Save SetAndClearWithDotBit.bs2 as SetAndClearWithDotBitYourTurn.bs2.
setClear
DEBUGIN DEC1 index
DEBUG CR, "Type 1 to set or 0 to clear: "
DEBUGIN BIN1 setClear
IF index = 0 THEN value.BIT0 = setClear
IF index = 1 THEN value.BIT1 = setClear
IF index = 2 THEN value.BIT2 = setClear
IF index = 3 THEN value.BIT3 = setClear
IF index = 4 THEN value.BIT4 = setClear
IF index = 5 THEN value.BIT5 = setClear
IF index = 6 THEN value.BIT6 = setClear
IF index = 7 THEN value.BIT7 = setClear
IF…THEN
index
BIN8 value, " <- Binary value", CR,
"76543210 <- Bit index", CR, CR,
"Type bit index (0 to 7): "
command clears the Receive Windowpane, displays the 8-bit binary
waits for half a second, then the main
from the Debug Terminal's Transmit Windowpane.
value
is set with a
statements examines the
variable, then displays the index values for each bit, followed
value
setClear
DEBUGIN
is assigned the 1 or 0 you stored in
in the bit you chose in the
command followed by a second
index
DO…LOOP
variable.
DEBUGIN
repeats. When it does,
value
command gets the
When a match is
setClear
value
variable is
variable.
DEBUG
.

Related parts for 28139