28125 Parallax Inc, 28125 Datasheet - Page 141

TEXT ROBOTICS

28125

Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet

Specifications of 28125

Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
Moving Backward, Rotating, and Pivoting
All it takes to get other motions out of your Boe-Bot are different combinations of the
PULSOUT Duration
to make your Boe-Bot go backwards:
These two commands will make your Boe-Bot rotate in a left turn (counterclockwise as
you are looking at it from above):
These two commands will make your Boe-Bot rotate in a right turn (clockwise as you are
looking at it from above):
You can combine all these commands into a single program that makes the Boe-Bot
move forward, turn left, turn right, then move backward.
Example Program: ForwardLeftRightBackward.bs2
' Robotics with the Boe-Bot - ForwardLeftRightBackward.bs2
' Move forward, left, right, then backward for testing and tuning.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
counter
FREQOUT 4, 2000, 3000
FOR counter = 1 TO 64
Enter, save, and run ForwardLeftRightBackward.bs2.
TIP – To enter this program quickly, use the BASIC Stamp Editor's Edit menu tools (Copy
and Paste) to make four copies of a
Duration
PULSOUT 13, 650
PULSOUT 12, 850
PULSOUT 13, 650
PULSOUT 12, 650
PULSOUT 13, 850
PULSOUT 12, 850
VAR
arguments. For example, these two
values and
Word
FOR…NEXT
loop
FOR…NEXT
EndValues
' Signal program start/reset.
' Forward
loop. Then, adjust only the
PULSOUT
.
commands can be used
PULSOUT

Related parts for 28125