28125 Parallax Inc, 28125 Datasheet - Page 171

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
SUMMARY
This chapter introduced the basic Boe-Bot maneuvers: forward, backward, rotating in
place to turn to the right or left, and pivoting. The type of maneuver is determined by the
PULSOUT
by the
Chapter 2 included a hardware adjustment, physically centering the Boe-Bot’s servos
with a screwdriver.
manipulating the software. Specifically, a difference in rotation speed between the two
servos was compensated for by changing the
for the faster of the two servos. This changes the Boe-Bot’s path from a curve to a
straight line if the servos are not perfectly matched. To refine turning so that the Boe-Bot
turns to the desired angle, the
can be adjusted.
Programming the Boe-Bot to travel a pre-defined distance can be accomplished by
measuring the distance it travels in one second, with the help of a ruler. Using this
distance, and the number of pulses in one second of run time, you can calculate the
number of pulses required to cover a desired distance.
Ramping was introduced as a way to gradually accelerate and decelerate. It’s kinder to
the servos, and we recommended that you use your own ramping routines in place of the
abrupt start and stop routines shown in the example programs. Ramping is accomplished
by taking the same variable that’s used as the
adding it to or subtracting it from 750 in the
Subroutines were introduced as a way to make pre-programmed maneuvers reusable by a
PBASIC program. Instead of writing an entire
single subroutine that contains a
GOSUB
A subroutine is called from the main program with a
subroutine is finished and it encounters the
executed is the one immediately following the
FOR…NEXT
command. A subroutine begins with a label, and ends with the
commands’
loop’s
Duration
StartValue
This chapter focused on fine tuning adjustments made by
StartValue
arguments. How far the maneuver goes is determined
FOR…NEXT
and
EndValue
and
PULSOUT
RETURN
Counter
loop can be executed as needed with the
GOSUB
PULSOUT
FOR…NEXT
EndValue
arguments.
command, the next command to be
command.
command’s
argument in a
command’s
loop for each new maneuver, a
arguments of a
GOSUB
Duration
command. When the
Duration
FOR…NEXT
RETURN
FOR…NEXT
argument.
command.
argument
loop and
loop

Related parts for 28125