28139 Parallax Inc, 28139 Datasheet - Page 123

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
already been set. The first time the program is run, the value of
zero. The
a speed. The
When an infrared message is coming in,
twice to let you know that you can release the button you were pressing on the remote.
Then, it calls the
keys to set the new speed, followed by ENTER to re-start the Boe-Bot. When an infrared
message is not coming in,
does not execute. The result is that the Boe-Bot keeps roaming.
Your Turn – Filtering for the POWER Key
At present, you can interrupt the Boe-Bot's roaming by pressing any TV control key on
the remote. Of course, this won't work if you press keys on the remote that aren't for a
TV control. Let's say you only want to use the POWER key to interrupt the Boe-Bot's
roaming.
You can modify the code so that the
when the POWER button is pressed by nesting all the code that gets the new speed from
the remote inside a second
Get_Ir_Remote_Code
remote button value it received in the
IF…THEN
update the
Save RoamingWithRemoteSpeedControl.bs2 as
RoamingWithRemoteSpeedControlYourTurn.bs2.
statement can check
IF…THEN
IF (IN9 = 0) OR (speed = 0) THEN
ENDIF
speed
FREQOUT Speaker, 100, 3500
PAUSE 100
GOSUB Get_Multi_Digit_Value
speed = value
PAUSE 250
IF…THEN
variable; otherwise, play an error code on the piezo speaker.
Get_Multi_Digit_Value
statement detects this and the code block within prompts you to enter
subroutine is called. Remember that this subroutine stores the
statement also detects when the remote is sending a message.
IN9 = 1
IF…THEN
remoteCode
, and the code block between the
Get_Multi_Digit_Value
statement. Before this
remoteCode
IN9 = 0
. If it's equal to the
subroutine, which is where you press the
. The code block starts by beeping
variable. So, this second, inner
' Check for IR message.
' Signal remote message
' detected.
' Get new speed.
' Set new speed.
' Pause for debounce.
subroutine is only called
IF…THEN
speed
Power
IF
is initialized to
and the
statement, the
constant, then
ENDIF

Related parts for 28139