28125 Parallax Inc, 28125 Datasheet - Page 144

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
' Robotics with the Boe-Bot - BoeBotForwardTenSeconds.bs2
' Make the Boe-Bot roll forward for ten seconds.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
counter
FREQOUT 4, 2000, 3000
FOR counter = 1 TO 407
NEXT
END
Your Turn – Adjusting Servo Speed to Straighten the Boe-Bot’s Path
Let’s say that the Boe-Bot turns slightly to the left. There are two ways to think about
this problem: either the left wheel is turning too slowly, or the right wheel is turning too
quickly. Since the Boe-Bot is already at full speed, speeding up the left wheel isn’t going
to be practical, but slowing down the right wheel should help remedy the situation.
Remember that servo speed is determined by the
argument. The closer the
you should change the 650 in the command
to 750. If the Boe-Bot is only just a little off course, maybe
trick. If the servos are severely mismatched, maybe it needs to be
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
Change the
Run the program, and watch closely to see if your Boe-Bot veers to the right or
left as it travels forwards for ten seconds.
If your Boe-Bot goes perfectly straight, try this example anyway.
instructions, it should adjust your Boe-Bot so that it curves slightly to the right.
VAR
EndValue
Word
Duration
of the
FOR counter
is to 750, the slower the servo turns. This means
PULSOUT 12,650
' Signal program start/reset.
' Number of pulses – run time.
' Left servo full speed ccw.
' Right servo full speed cw.
from 122 to 407, so it reads like this:
PULSOUT
PULSOUT 12,663
to something a little closer
command’s
PULSOUT 12,690
If you follow the
will do the
Duration
.

Related parts for 28125