FIGURE 7. A recommended
interface circuit for the output of
the MP3 player shield. It's
important that you don't connect
the GBUF line as a ground. You
can experiment with the capacitor
and resistor values.
track001.mp3, and so forth.
(You can use other filenames
in the sketches you write, but
in order to be used by the
MP3 Player shield they must
be in standard 8+ 3 filename
6. Click the Save button. Fill in
the metadata fields if you
wish to use them. You can
leave them blank; the
metadata has no effect
over the actual playing of the clip.
If the sound you want to export
doesn’t already exist, you can record your
own directly in Audacity. Connect a
microphone to your PC and choose
44100 for the Project Rate. Click on the
Record button, then talk, sing, play an
instrument, make rude noises, whatever.
When you’re done, click the Stop button
to terminate recording. Follow Steps 3
through 6 above.
Building and Using
the MP3 Player
As noted, the Musicbot uses an
Arduino Uno and a SparkFun MP3 player
shield. The shield plugs directly into the
Arduino, making all the necessary electrical
connections between the two. The shield
uses the majority of pins on the Arduino,
but there’s still enough free for
experimentation. For initial testing of the
shield, use a pair of headphones to
audition the MP3 sound.
Before placing the shield on the
Arduino, however, first load the sketch in
Listing 1 to your Arduino (this sketch
and the others in this article are for the
Arduino 1.0 software). Doing this as a
first step ensures there are no I/O pin
settings from a previous sketch that
could damage the shield. The MP3
FIGURE 8. Full wiring for the servos,
bumper switches, and Arduino. Be sure not
to cross up the power wiring for the servos,
or they may be instantly damaged.
42 SERVO 05.2012