Introduction: Binary Switch With Makey Makey

About: Computers are going bananas! Use #makeymakey to practice invention literacy and connect the world to your computer.

One of the fundamental computer science concepts is that everything we do on a computer is really just turning binary digits on and off. Even though this sounds simple, it can be a concept that is hard to wrap one's head around. This activity brings the binary concept to reality by creating a binary switch with the MaKey MaKey kit to turn a Scratch animation on or off.

Step 1:

This guide was made by techkim for a How To contest we ran in 2013.

You can see the original PDF here attached.

Step 2:

Ever see a binary clock? Not so simple to read for humans (at least not this human).

Step 3:

Check out the CS Unplugged Count the Dots videos & activities. This helps demonstrate how binary numbers works.

Step 4:

Try your luck at the Binary Game.

Step 5:

If you have never used Scratch before, the Scratch cards are a great way to get familiar with the coding blocks.

Step 6:

Create an account on Scratch and then go to MaKey MaKeyBinary Switch IBinary Switch I. Select See inside code and then Remix.

Or use the program here.


Step 7:

Within the Scratch project, select the Stage, see variable called switch. This is what will turn the animation on and off (1=ON and 0=OFF). Do you see which keys correspond to ON and OFF?

Step 8:

Select Sprite1. See that when the variable switch is set to 1, the sprite moves forward. When switch is set to 0, the sprite stops moving forward and it waits for you to switch it on again. Notice the code is checking forever whether the switch is set to 1, then it is performs the ON code, else it performs the OFF code.

Step 9:

Create a ON / OFF switch with your MaKey MaKey kit. Remember which key is ON and which is OFF? You'll also need to complete the circuit, which means you must be connected to the ground wire in some way (I'm a fan of the tin foil bracelet, except when it itches;-).

Step 10: Extensions (Optional)

  • Try remixing the Scratch project to add sound that will turn on and off using the same switch variable.
  • Add another sprite and have its movements turn on and off using the same switch variable.
  • How many different On / Off switches can you design with for the MaKey MaKey?
  • What happens if you reserve the switch?
  • Can you use just one input key to switch between on and off? Have you ever heard of The Clapper!
  • See Makey Makey Binary Switch II for more examples.