Datasheet
Chapter 3 • Assemble and Test your BOE Shield-Bot
100 • Robotics with the BOE Shield-Bot
Chapter 3 Challenges
Questions
1. What are some of the symptoms of brownout on the BOE Shield-Bot?
2. What is a reset?
3. How can a piezospeaker be used to announce that brownout just occurred?
4. What function makes the speaker play tones?
5. What’s a hertz? What’s its abbreviation?
Exercises
1. Write a statement that makes a tone, one that sounds different from the start-
alert tone, to signify the end of a sketch.
2. Write a statement that plays a speaker tone to signify an intermediate step in the
sketch. This tone should be different from a start-alert or end tone.
Projects
1. Modify the TestServoSpeed sketch so that it makes a tone signifying each test is
complete.
2. Modify the TestServoSpeed sketch so that it runs both wheels instead of just one
with each test. Make the right wheel turn the opposite direction from the left
wheel.
Question Solutions
1. Symptoms include erratic behavior such as going in unexpected directions or
doing a confused dance.
2. It’s when the Arduino restarts executing a sketch from the beginning. Resets
occur when you press/release the reset button, disconnect/reconnect power, or
when the Arduino receives insufficient power due to brownout.
3. If you add statements that make the piezospeaker play a tone at the beginning of
all your sketches, it’ll play a tone if a brownout occurs. That way, you can know
whether to replace the batteries or check for an error in your navigation code.
4. The
tone function.
5. A hertz is a measurement of the number of times per second a signal repeats
itself. It is abbreviated Hz.
Exercise Solutions
1. tone(4, 2000, 1500); //example, your tone may be different.
2.
tone(4, 4000, 75); //example, your tone may be different.