70016 Parallax Inc, 70016 Datasheet - Page 78

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
A Simple Boe-Bot Main Routine
In the previous activity, you replaced the main routine in IrRemoteButtons.bs2 with a
code block that contained a
SELECT…CASE
evaluate it on a
the
for each different
SELECT…CASE
each
maneuvers.
4BitRemoteBoeBot.bs2 from Chapter 1, Activity #5. The difference is, this time, it will
be really easy to write, and even easier to adjust and expand.
All you have to do with the next example program is open IrRemoteButtons.bs2, save it
under a new name, and modify the main routine. The IR remote code reading is taken
care of in a subroutine, so you can focus on programming the Boe-Bot, and all you need
to know is the value of the
subroutine.
Example Program – 7BitRemoteBoeBot.bs2
This example gives you all the number key features of 4BitRemoteBoeBot.bs2 from
Chapter 1, Activity #5, plus the CH+/- and VOL+/- key features from Chapter 1, Activity
#4.
remoteCode
CASE
Open IrRemoteButtons.bs2 and save it as 7BitRemoteBoeBot.bs2.
Add an initialization section just before the Main Routine:
' -----[ Initialization ]----------------------------------------------
DEBUG "Press and hold a key (1-9 or CH/VOL)..."
FREQOUT 4, 2000, 3000
Replace the
statement can contain code blocks that deliver pulses for different Boe-Bot
works is that you use it to
is also really good for Boe-Bot navigation. Instead of
CASE
This
variable on a case by case basis, executing different
CASE
DO…LOOP
by
(value stored in
can
CASE
remoteCode
SELECT…CASE
be
in the main routine with this one:
basis.
showcased
SELECT remoteCode
remoteCode
variable after you call the
SELECT
statement. The best way to remember how
by
a (constant, variable or expression) and
).
repeating
' Start/reset indicator.
made it possible to evaluate
the
Get_Ir_Remote_Code
DEBUG
DEBUG
functionality
commands,
commands
of

Related parts for 70016