Page 120 ·
Robotics with the Boe-Bot
Solutions
Q1.
Symptoms include erratic behavior such as going in unexpected directions or
doing a confused dance.
Q2.
A
FREQOUT
command at the beginning of all Boe-Bot programs causes the
piezospeaker to play a tone. This tone will therefore occur every time an
accidental reset happens due to brownout conditions.
Q3.
A reset is when the power is interrupted and the BASIC Stamp program starts
running again from the beginning of the program.
Q4.
An initialization routine consists of the lines of code that are used at the
beginning of the program. These lines of code run each time the program starts
from the beginning.
Q5.
1. The servo lines P12 and P13 are swapped.
2. One or both servos is plugged in backwards, so that the white-red-black color
coding is incorrect.
3. The power switch is not on position-2.
4. The 9V or AA batteries are not installed.
5. The servo centering potentiometer is out of adjustment.
Q6.
The
PULSOUT
commands must be changed to read
PULSOUT 13
instead of
PULSOUT 12
.
E1.
The key is to modify the
FREQOUT
command used for the StartResetIndicator.bs2
program, that is,
FREQOUT, 4, 2000, 3000
. For example:
FREQOUT, 4, 500,
3500
would work.
E2.
FREQOUT
4,
100,
4000
P1.
The key to solving this program is to add the line from Exercise 1 above the
END
command in the RightServoTest.bs2 program.
' Robotics with the Boe-Bot - Ch03Prj01_TestCompleteTone.bs2
' Right servo turns clockwise three seconds, stops 1 second, then
' counterclockwise three seconds. A tone signifies that the
' test is complete.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
counter VAR Word