samplers, you’ll remove the Play button, test
its pads on the circuit board, then solder a
wire to the pad that works when connected to
Ground.) Do the same with the Record button
— find the wire that works when touched to
Ground, and cut the other one away.
Mount female headers to both wires, then
connect the Record wire to I2 on the main
board and the Play wire to I3.
Mount the microphone and LED somewhere
nice and visible. Now’s the time to be creative
with extra little decorative parts. (I found a
shiny plastic ring that works well holding the
microphone.) To tidy up, use cable ties and hot
glue, and you can also shorten wire lengths.
With all the motors tested and wired properly, compile and upload the final code, ydm_
default.bas. Place the robot on a hard surface
and power it up; it should look to the sides and
begin driving around. After some time, it may
feel it’s time to get funky. It will then search for
an appropriate item (like a wall) to drum on.
Eventually, it will find an object it likes, then
tap a little beat on it.
The Yellow Drum Machine will record its
drumming, then play it back in a loop while
drumming more and making clicks from its
lower speaker to the beat. Meanwhile, it also
makes dance motions with its head and body.
While the robot records itself, it will also
record your voice or other nearby sounds and
include them in its tune. This is especially
entertaining for kids. Play a musical instrument to “jam” with the YDM, letting it record
and play back your riffs as an accompanist.
The BASIC software is written for modifying
and playing. All parameters can be reset, and
notes at the top and comments throughout
explain how everything works. So you can
make the YDM drum only when you enter the
room, or use it as a platform to do a lot of
other things. You can even make it draw.
U
7. Program, test, adjust, and play.
At this point, you should have a nice little
robot. Now it’s time to give the robot its
program. Download and install the Picaxe
Programming Editor or AXEpad (depending
on your computer OS) from rev-ed.co.uk/
picaxe/ software.htm, if you haven’t already.
Launch the software, then open the Mode
and Ports tabs under the Options panel to
specify the type of chip (28X1) and the COM
port for your computer’s USB.
Switch the main board off (remove a battery) and connect it to your computer using
the Picaxe programming cable. Download the
code files from makeprojects.com/v/27.
Each motor has a test code file in the test
directory. Open each in the programming editor and click Program to compile and upload it
to the microcontroller. Replace the battery and
check that the motor behaves as it should, as
described at the top of the test code, or swap
its wires if it runs in the reverse direction.
The test runs will also guide you in trimming
the sticks to adjust their balance. The sticks
should be light enough for the motors to move
easily, but with fiberglass or carbon fiber rods,
it might help to epoxy a small bolt or screw at
the end, to make the strikes louder.
Frits Lyneborg is co-host of “The Latest In Hobby Robotics”
( blog.makezine.com/video) and runs letsmakerobots.com,
the largest online community of its kind, which he started
in 2008 as a forum for robot electronics, programming, and
funny ideas and inspiration.
Garry McLeod
48 Make: makezine.com/27