This project is from Getting Started with Raspberry Pi by Matt Richardson and Shawn Wallace. It assumes that you already know how to set up and operate the Raspberry Pi platform, and that you know the basics of the Python programming language. If you want to get up to speed quickly, you can find all of the above (and much more) in Richardson and Wallace’s book, available in the Maker Shed (makershed.com).
Download soundboard.py.
Download the public domain sound effects.
MAKE Volume 33 features our special Software for Makers section covering apps for circuit board design, 3D design and printing, microcontrollers, and programming for kids. Also, meet our new Arduino-powered Rovera robot and get started with Raspberry Pi. As usual, you’ll also find fascinating makers inside, like the maniacs on our cover, the hackers behind the popular Power Racing Series events at Maker Faire.
Try your hand at 22 great DIY projects, like the Optical Tremolo guitar effects box, "Panjolele" cake-pan ukelele, Wii Nunchuk Mouse, CNC joinery tricks, treat-dispensing cat scratching post, laser-cut flexing wooden books, sake brewing, growing incredibly hot “ghost chili” peppers, and much more.
On newsstands now, by subscription, or available in the Maker Shed


Matt, the links are missing
Is there any chance we could get the links included in this article?
That should fix it!
I just tried this out. I had forgotten to put the sound files in place and so there was nothing for the Python script to play when a button was pressed. What I heard instead was a buzzing sound as long as the button was pressed. It stopped once I released the button. I put the sound files in place and tried again and could still hear the buzzing just before the sound file was played. Any ideas on where the buzz is coming from and how to eliminate it?
That sounds like a grounding issue… Maybe try a different power supply?
Per your suggestion I tried a couple of different power supplies I have on hand but there wasn’t any difference. If I get a chance I’ll wire up a voltage regulator and try running the Pi off a battery pack and post the results.
Interesting. I hooked everything up again today and ran it off the first power supply I used last night. No buzzes. However, if I moved or renamed a sound file so the script couldn’t find it I did get a buzz but only for the one button that looked for it. When I put the sound file back in place the buzz was gone.
Anyway, I went ahead and wired up a 5v voltage regulator and ran the Pi off a 9V battery. No buzzes when the sound files were in place but there was a buzz when the sound files weren’t there.
The only real difference between last night and this afternoon was the breadboard. I used my Elenco 9425 today. Last night I used my Radio Shack 278-003. Maybe the large metal plate on the bottom of the Elenco made the difference. Something else to look into.
Thanks for the tip!
It looks like the buzzing you are hearing is the “play” command executing every 0.1 seconds while you hold the pin high. when you stop the play command finally gets to execute the sound completely. you can modify the python code to account for this. also, fart noises are a pretty good alternative choice for sound effects!
Related Projects
Mystery Electronic Switches
By: Jeff Tregre
Aircraft Band Receiver
By: Steve Hobley
Computer Printer Salvage
By: Thomas Arey N2EI
The Awesome Button
By: Matt Richardson
Beetlebots
By: Jerome Demers
LED Yo-Yo Side Caps
By: Eric Chu
Mini Fume Extractor
By: Mark de Vinck
Vibrobots
By: Mark Frauenfelder
Trending Topics
Get our Newsletters
About Maker Media
Subscribe
to MAKE!
Get the print and digital versions when you subscribe