voltage. Though the MIDI output is stereo, I’m showing it
using only one output channel.
Use a small self-powered amplifier, like the capsule type
in Figure 10. These amps contain their own rechargeable
battery. Connection to the Parallax line follower module is
shown in Figure 11. The line follower module contains an
onboard sensitivity adjustment; set it to give you the
greatest range. See the documentation for the module for
The Tunebot uses a sketch called MIDI_Piano. The
program listing is too lengthy to reproduce here; you can
download it at the article link.
To use the Tunebot, upload its sketch to the Arduino,
plug in power to the servos, and set the robot on the
ground. Simple movement patterns over the line follower
module control the bot:
• Pass your fingers over the center sensors to make the
robot go forward. Activate the center sensors again and
the robot reverses direction.
Experiment with the line sensor coding to add other
finger gesture controls. For example, you might add code
that listens for a specific three or four note tune in order to
activate the Tunebot. Create some code to play your
favorite songs while the Tunebot is moving.
Add sound effects – use instruments from the drum
bank – and sound them off in response to other sensors
you’ve attached to the robot. How about a cymbal crash
when a bumper switch is activated. Or, maybe the slide of a
trombone to indicate distance from an ultrasonic
rangefinder. Figure 12 shows an alternative version of the
Tunebot, with several sensors mounted on the front to
detect nearby objects.
Adding Digitized Sounds,
Music, and Effects
MIDI is a wonderful method of adding music to your
robot, but it’s not the only technique
you can use. A number of Arduino
shields and breakout boards allow
you to reproduce sound from MP3
and other kinds of digitized clips.
Next time around, we’ll talk about
adding recorded voice, music, and
sound effects to your Arduino-based
ArdBot Chassis: Precut Body Parts,
Line Follower Module (#28034)
Music Instrument Shield (DEV-10587)
62 SERVO 04.2012