Your Turn – Condensing the Program
This program does not need the
follow. If you deliver no pulses, the Boe-Bot will sit still, just as it should when you
deliver pulses using 750 for the
√
Try deleting (or commenting) this code block.
ELSE
PULSOUT 13, 750
PULSOUT 12, 750
√
Run the modified program.
√
Can you detect any difference in the Boe-Bot's behavior?
ACTIVITY #4: GETTING MORE INFORMATION FROM YOUR
PHOTORESISTORS
The only information the BASIC Stamp was able to gather from the photoresistor divider
circuits was whether the light level was above or below a threshold. This activity
introduces a different circuit that the BASIC Stamp can monitor, and actually gather
enough information from it to determine relative light levels. The value the BASIC
Stamp gets from the circuit will range from small numbers, indicating bright light, to
large numbers, indicating low light. This means no more manually replacing series
resistors based on light levels. Instead, you will be able to adjust your program to look
for different ranges of values.
Introducing the Capacitor
A capacitor is a device that stores charge, and it is a fundamental building block of many
circuits. How much charge the capacitor tends to store is measured in farads (F). A farad
is a very large value that's not practical for use with the Boe-Bot. The capacitors you
will use in this activity store fractions of millionths of farads. A millionth of a farad is
called a microfarad, and it's abbreviated µF. The capacitor you will use in this exercise
stores one one-hundredth of a millionth of a farad. That's 0.01 µF.
Chapter 6: Light Sensitive Navigation with Photoresistors · Page 205
condition or the two
ELSE
argument.
PULSOUT Duration
commands that
PULSOUT
Need help?
Do you have a question about the Boe-Bot and is the answer not in the manual?
Questions and answers