28139 Parallax Inc, 28139 Datasheet - Page 118

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
This
value of the
each servo should turn, the
the servo's speed.
After the
statement, these variables are used to set the
PULSOUT
determine the direction and speed the Boe-Bot wheels turn.
Your Turn – Saving Variable Space
You can save two word-size RAM variables by using
IF…THEN
DEBUG
IF…THEN
DEBUG "Main routine running..."
Save your working program under another name
(like IrRoamingWithSpeedControlYourTurn.bs2).
Click Run and select Memory Map (or CTRL-M or the Memory Map toolbar icon).
message indicates that the main routine is running.
statement. Here's how:
pulseLeft
commands send pulses to the left and right servos, and the pulse durations
The percent value you enter determines the percent of the full speed pulse width.
This is not the same as the actual speed. For help predicting the actual speed, consult the
transfer curves introduced in Robotics with the Boe-Bot, Chapter 3, Activity #4.
IF (irDetectLeft = 0) AND (irDetectRight = 0) THEN
ELSEIF (irDetectLeft = 0) THEN
ELSEIF (irDetectRight = 0) THEN
ELSE
ENDIF
PULSOUT 13,pulseLeft
PULSOUT 12,pulseRight
PAUSE 15
pulseLeft
pulseRight =
pulseLeft
pulseRight = 750 + speed
pulseLeft = 750 - speed
pulseRight = 750 - speed
pulseLeft = 750 + speed
pulseRight = 750 - speed
pulseLeft
statement was introduced just before the example program. It sets the
and
=
= 750 + speed
and
pulseRight
speed
750 - speed
750 + speed
pulseRight
value is either added to or subtracted from 750 to set
variable values have been set by the
variables. Depending on which direction
PULSOUT Duration
' <-- Add
' <-- Change
' <-- Change
' <-- Change
' <-- Change
' <-- Change
' <-- Change
' <-- Change
' <-- Change
PULSOUT
' Apply the pulse.
commands inside the
arguments. These
IF…THEN

Related parts for 28139