28125 Parallax Inc, 28125 Datasheet - Page 151

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
ACTIVITY #4: MANEUVERS – RAMPING
Ramping is a way to gradually increase or decrease the speed of the servos instead of
abruptly starting or stopping. This technique can increase the life expectancy of both
your Boe-Bot’s batteries and your servos.
Programming for Ramping
The key to ramping is to use variables along with constants for the
Duration
speed from full stop to full speed ahead. Each time the
pulseCount
like using the commands
through the loop, the value of
13, 752
does the speed of the servos. By the hundredth time through the loop, the
variable is 100, so it’s like using the commands
650
, which is full-speed ahead for the Boe-Bot.
Modify BoeBotForwardOneSecond.bs2 so that it delivers the number of pulses
you determined for your distance.
Run the program and test to see how close you got.
p
and
ulses
This technique has sources of error. The activity you just completed does not take into
account the fact that it took a certain number of pulses for the Boe-Bot to get up to full
speed. Nor did it take into account any distance the Boe-Bot might coast before it comes to
a full stop. The servo speeds will also go slower as the batteries lose their charge.
You can increase the accuracy of your Boe-Bot distances with devices called encoders,
which count the holes in the Boe-Bot's wheels as they pass.
documentation and example programs are available in the Robotics
www.parallax.com.
argument. Figure 4-4 shows a
variable increases by 1. The first time through,
PULSOUT 12, 748
=
Boe
Boe
Bot
Bot
dis
PULSOUT 13, 751
speed
tan
pulseCount
ce
. As the value of the
×
40
.
65
s
pulses
is 2, so it’s like using the commands
FOR…NEXT
and
PULSOUT 13, 850
PULSOUT 12, 749
pulseCount
loop that can ramp the Boe-Bot’s
FOR…NEXT
pulseCount
loop repeats itself, the
PULSOUT
variable increases, so
Encoders hardware,
. The second time
and
Accessories page at
PULSOUT 12,
pulseCount
is 1, so it’s
command’s
PULSOUT

Related parts for 28125