Chapter 3: Assemble and Test Your Boe-Bot
· Page 111
An initialization routine
is comprised of all the commands necessary to get a device or
program up and running. It often includes setting certain variable values, beeping noises,
and for more complex devices, self testing and calibration.
√
Open HelloOnceEverySecond.bs2.
√
Copy the
FREQOUT
command from StartResetIndicator.bs2 into
HelloOnceEverySecond.bs2 above the
DO…LOOP
section.
√
Run the modified program and verify that it responds with a warning tone every
time the BASIC Stamp is reset (either by pressing and releasing the
Reset
button
on the board or disconnecting and reconnecting the battery supply).
ACTIVITY #4: TESTING SPEED CONTROL WITH THE DEBUG TERMINAL
In this activity, you will graph servo speed vs. pulse width. One thing that can make this
process go much more quickly is the Debug Terminal’s Transmit windowpane, which is
shown in Figure 3-19. You can use the Transmit windowpane to send the BASIC Stamp
messages. By sending messages that tell the BASIC Stamp what pulse width to deliver to
the servo, you can test the servo speed at various pulse widths.
Figure 3-19
Debug Terminal
Windowpanes
Pulse width
is a common way to describe how long a pulse lasts. The reason it is called
pulse "width" is because the amount of time a pulse lasts is related to how wide it is on a
timing diagram. Pulses that last longer are wider on timing diagrams, and pulses that last
for short periods of time are narrow.
Transmit
Windowpane
Receive
Windowpane