M33_Codebox_MakeyOverhead

Kids get wide-eyed when they realize they can make music just by tapping on a row of bananas. Adults start jamming out on classic tunes, and then inevitably somebody discovers that they can play a sound by connecting two people: a high-five, or even a kiss, can trigger a cymbal crash.

It’s all possible thanks to MaKey MaKey, a new invention kit developed by Jay Silver and Eric Rosenbaum. First you alligator clip everyday materials like bananas, Play-Doh, or your grandma to the MaKey MaKey circuit board. Then you plug it into your computer, which thinks MaKey MaKey is a USB keyboard. Now, when you complete a circuit through the bananas (or anything even
a tiny bit electrically conductive), the computer thinks a key has been pressed.

YouTube player

MaKey MaKey works with just about any software you’ve already got, because it works like a keyboard that lets you make your own keys (it can click and move the mouse cursor, too). You can play games on a controller drawn in pencil, make music with fruit, advance your PowerPoint slides by taking bites from a pastry, take a picture of your cat when it takes a drink, or navigate Google Earth with your bare feet (check out the video at makeymakey.com to see lots of fun examples).

One of the most powerful ways to use MaKey MaKey is to combine it with Scratch, a free and easy-to-use graphical programming language we helped create as part of the Lifelong Kindergarten group at MIT Media Lab (see scratch.mit.edu). Scratch lets you make stories, games and animations just by snapping blocks together on the screen. It’s easy to make things happen when a key is pressed. The only limit to what you can create with Scratch and MaKey MaKey is your imagination. Here is a project we made to get you started.


M33_Codebox_banana_piano

Banana Piano

How do you make a banana into a piano key? First we’ll set up MaKey MaKey so you can complete a circuit by touching a banana.

M33_Codebox_linedrawing-jb

Connect yourself to ground, and a banana to “space” on the MaKey MaKey. Now, when you touch the banana, the computer thinks the space key was pressed.

Next we’ll set up Scratch to play a sound when you press the space key (or touch a banana).

M33_Codebox_scratch-spckey

Just put these blocks (above) together in Scratch, and when you press the space key, it will play a piano note.

Now that you’ve got one banana working, we can set up some more keys and play some tunes!

We made a piano in Scratch, with different notes triggered by the up, down, left, and right arrow keys, by the space bar, and by a mouse click. Each banana is plugged into one of those inputs on the MaKey MaKey. To connect the person to ground so they can complete the circuit, we like to use a lime.

What other musical instruments could you make? Lots of different types of fruit, vegetables, and other food will work for making pianos. You can play with other sounds, too. Can you make a drum kit out of cheese? How about a squishy sound effects machine made out of a few marshmallows?


Each time the horse rocks to the back or the front, Scratch steps the animation forward by one frame.
Each time the horse rocks to the back or the front, Scratch steps the animation forward by one frame.

Rock-and-Roll Rocking Horse

Tired of the usual game controllers? We decided to make a wooden rocking horse into a whole new kind of controller using MaKey MaKey and Scratch. First we made two simple switches that close when pressure is applied — we made ours out of clothespins and foil. We attached one to the front and one to the back of the rocking horse’s rail. When the horse rocks, the clothespins press together, completing a circuit so that MaKey MaKey presses a key.

For our Scratch animation, we used an animated GIF of a horse running made from photographs created by Eadweard Muybridge back in the 1870s.

We imported the GIF into Scratch, creating a separate costume for each frame. (In Scratch, objects that perform functions are called sprites, and each frame of a sprite is a costume.) Then we used Scratch blocks to advance to the next costume at each rock, creating the illusion of movement — just as Muybridge discovered. The faster you rock, the faster the horse runs.

M33_Codebox_scratch-arrow

What else could you control with your own rocking horse? Maybe it needs a carrot you can feed to it, or some head-mounted lasers.

What other toys can you turn into controllers for your own games in Scratch?


M33_Codebox_door_knocker

Door Knocker of Doom

We wanted to create an interactive Halloween scare at the front door, using a MaKey MaKey and a computer running Scratch showing in the window. We experimented with the brass door knocker and found that it was conductive. Then we connected two clips to it: one on the base, connected to ground on the MaKey MaKey, and the other on the handle of the knocker, connected to “space.“ The knocker normally sits touching the base, so Scratch will think you’re holding down the space key until you lift the knocker. Our little Scratch program waits until you lift the knocker, and then plays sound and animation.

M33_Codebox_scratch-wait

Our example just makes the Scratch cat say “boo.” What terrifying animations and sounds will you create? You can draw scary scenes using Scratch’s built-in paint editor, or import other photos and graphics, then make them come to life using the motion and graphic effects blocks. You can record your own horrifying sounds, or find sounds online. You can also try connecting your computer to a projector or speaker system for bigger, louder effects. And of course, it’s not just about door knockers: you can use anything that makes or breaks a circuit.


Other Ways to Connect Scratch to the Physical World

MaKey MaKey isn’t the only way to create cool physical-digital projects with Scratch.
Here are two other Scratch-compatible tools.

Picoboard
The PicoBoard (aka Scratch Board) is an open source sensor board available from SparkFun.
It can sense levels of light and sound, the position of its built-in slider knob, the state of its button, and the resistance between each of its four electrical inputs (which come with wires and alligator clips). Scratchers have used PicoBoards to make every-thing from controllers for interactive games to sophisticated alarm systems.

Lego Wedo
The WeDo is a robotics kit developed by Lego for kids ages 7 and up. You can control your Scratch projects with the WeDo’s distance and tilt sensors, and activate the WeDo’s motor to create moving mechanisms. The WeDo is available online through the Lego education website.

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

Buy now!