It will probably take several tries to get the right value. Let's say that your first guess is
that
will do the trick, but it turns out not to be enough because the Boe-
PULSOUT 12,663
Bot is still turning slightly to the left.
overcorrects, and it turns out that
iterative process, meaning a process that takes repeated tries and refinements to get to the
right value.
If your Boe-Bot curved to the right instead of the left, it means you need to slow down
the left wheel by reducing the
Again, the closer this value gets to 750, the slower the servo will turn.
√
Modify BoeBotForwardTenSeconds.bs2 so that it makes your Boe-Bot go
straight forward.
√
Use masking tape or a sticker to label each servo with the best
√
If your Boe-Bot already travels straight forward, try the modifications just
discussed to see the effect. It should cause the Boe-Bot to travel in a curve
instead of a straight line.
You might find that there's an entirely different situation when you program your Boe-
Bot to roll backward.
√
Modify BoeBotForwardTenSeconds.bs2 so that it makes the Boe-Bot roll
backward for ten seconds.
√
Repeat the test for straight line.
√
Repeat the steps for correcting the
straighten the Boe-Bot's backward travel.
Tuning the Turns
Software adjustments can also be made to get the Boe-Bot to turn to a desired angle, such
as 90°. The amount of time the Boe-Bot spends rotating in place determines how far it
turns. Because the
FOR...NEXT
argument to get very close to the turning angle you want.
EndValue
Here's the left turn routine from ForwardLeftRightBackward.bs2.
FOR counter = 1 TO 24
PULSOUT 13, 650
Chapter 4: Boe-Bot Navigation · Page 131
So try
PULSOUT 12,670.
gets it exactly right. This is called an
PULSOUT 12,665
of 850 in the
Duration
command's
PULSOUT
loop controls run time, you can adjust the
' Rotate left - about 1/4 turn
Maybe that
command.
PULSOUT 13,850
values.
PULSOUT
argument to
Duration
loop's
FOR...NEXT
Need help?
Do you have a question about the Boe-Bot and is the answer not in the manual?
Questions and answers