Introduction: Hands Free Voting Booth With Makey Makey
This guide will share with you how to create a hands-free voting booth using the Makey Makey and Scratch. This project allows voters to step on a pad on the floor to cast their vote for their favorite book character. It is based on two Makey Makey projects: Ultimate Stomping Pad with Makey Makey and Make Your Own Exit Ticket or Data Tracker. By completing this project you will learn how to create a pressure sensor for the Makey Makey and create a script in Scratch to tally votes.
The inspiration for this project came from the desire to provide some type of self directed program for children during a library summer reading program. The stomp pad element will allow users to participate in a hands-free manner and to prevent the spread of disease via high contact items.
Supplies
- Cardboard
- Duct Tape
- Clear Tape
- Copper Tape
- Aluminum Foil
- Rubber Bands
- Scissors
- Marker/Pencil
- Glue Stick
- Ruler/Measuring Tape
- Box Cutter
- Makey Makey with Alligator Clips and Connecting Wires
- Computer
- Scratch Code
Step 1: Create a Stomp Pad
This project will require the creation of a stomp pad for each voting selection. Makey Makey has created an excellent Instructable to show you how to create a stomp pad.
The stomp pad is a pressure switch for the Makey Makey that is constructed with cardboard, aluminum foil, copper tape, wire, duct tape, and rubber bands. When the stomp pad is pressed it will complete an electric circuit when paired with the Makey Makey. The Makey Makey, in turn, will control your Scratch program. With each press on the stomp pad a vote will be logged in the Scratch program.
To create your stomp pad you will need to cut two cardboard pieces into matching rectangles. Pictured stomp pads are roughly 4x3 inches. You will then need to cover each of these cardboard pieces with aluminum foil. Be sure to leave some extra foil at the end to fold over your cardboard edge. Glue aluminum foil to cardboard. (Picture 2)
Next, you will secure two of the white connecting wires found in your Makey Makey kit to your stomp pad. Lay your cardboard pieces side by side as if they were a book laying open. Using clear tape, secure your wires to your cardboard squares near the center of the aluminum foil to maximize the connection in the circuit. (Picture 3)
Now, you will reinforce the electric connections with your wires. Cut several small pieces of your copper tape. Use the copper tape to connect the exposed part of the wire to your aluminum foil. Cover this connection and the edge of your cardboard with duct tape. (Pictures 3 & 4)
It is time to connect your cardboard pieces together. Line your cardboard up side by side and place duct tape over the seam. (Picture 5). Close your cardboard "book" and then cover the outside seam (or spine) with duct tape as well. (Picture 6).
To ensure that your circuit is not completed until someone presses on it you will now add an insulator. Add 5 rubber bands to your stomp pad as pictured (Picture 7).
You have now created a stomp pad! You will need one stomp pad per voting selection. In this example, we are allowing students to choose from four different book characters. (Picture 1).
It is time to connect your stomp pad to your Makey Makey. There are two wires coming from your stomp pad. One wire will be connected to your Earth and the other will be connected to a key press (such as an arrow).
Let's code!
Step 2: Code Your Voting Booth
Now we're going to code our voting booth using Scratch. Scratch is a free, block based coding program available from MIT. We're going to code a program to keep score of votes and use the Makey Makey as the controller for this program. The Scratch program that we will create will include the creation of variables and a score keeping mechanism. To create this program you will need to have the following Scratch skills: how to change and add sprites, and how to change your background.
To begin, you will change our background to something fun. We chose a space theme. We have also added text to our background via the background costume. You will then add the sprites that you would like voters to choose from when they vote. We have added 4 sprites. (Picture 1)
You will now need to create a variable to represent each of your voting options. From the block choices select variable (these are orange blocks). Your options for variable blocks will now appear. Select "make variable." (Picture 2). Now name your variable (Picture 3). Create a variable for each voting selection. Our example has a variable for caterpillar, elephant, cat, and dog. (Picture 4).
A variable is a new item of your own creation in your code!
You will now create a code for each one of your sprites using these variables. (Pictures 5-8). Each sprite will contain three coding sections. The first section will set your variables score to 0. The second section will tell your variable's score to change by 1 when the appropriate key is pressed. This part will be controlled by your Makey Makey. The third coding section will show the final score for each variable.
Section 1: Set your score to 0
- Start your code with an event. Here, we have used "when flag clicked."
- From the variables block area add a "set variable" to 0 block" and a hide variable block. In each of these blocks select the appropriate matching sprite. This will keep the score from being visible to voters.
- For fun add a sound! When pressed our sprite makes a "pop" sound. Add a sound from the sound block area.
Section 2: Change score by 1
- Start your code with another event. In this example we have used start "when space bar pressed."
- Select a unique key press for each sprite. In this example we have used the arrows. Your Makey Makey will control each of these buttons when connected to your program.
- From the variables block area add a "change variable by 1" block. Each time that the corresponding button is pressed the score for this sprite will go up by 1.
Section 3: Final Score
- Start your code with another event. In this example we have used start"when space bar pressed." We have kept the space bar as the key for this code section.
- From the variables block area add "show variable." When the space bar is pressed the score for this variable will now appear. Now we can see who got the most votes!
Pictures 5-8 outline the code for each sprite. We have used the same code for all the sprites with a few alterations. The variable used for each sprite should be the one that represents it. For the elephant sprite we used the elephant variable. Each sprite's counter will respond to an individual key press. For our example we used the arrow keys and each sprite responds to one arrow (up, down, left, or right).
Step 3: Putting It All Together!
It's time to put it all together! In order to create the hands-free voting station you will now connect your stomp pads to your Scratch program using the Makey Makey.
Your Makey Makey will be used to control the keys that you have selected in your Scratch program. In our example we are using the arrows (up, down, left, right). Each sprite in your Scratch program has a point counter that will respond to one of these arrows. You will now need to connect your stomp pads to each one of these keys on your Makey Makey.(Pictures 1).
Your stomp pads have two wires coming out of them: one that is Earth and one that will connect to your key. Using your alligator clips connect these two wires to the Makey Makey. Clip the alligator clips to the wires on your stomp pad. (Picture 2). Clip the other end of the Earth cable to the Earth bar. Then clip the other end of your other cable to one of the arrows (or your selected key). (Picture 3). Repeat for all stomp pads and remaining keys. Make sure to mark your stomp pads in some way to make sure they connect to the matching key press. We glued a picture of the character we wanted represented on each stomp pad (Picture 4).
Once you have connected all of your stomp pads to your Makey Makey you can plug your Makey Makey into your computer with the USB cable. This will power it on. If you step on your stomp pads you should see that the light on the Makey Makey comes on for each key press. It's working! Once you press the space bar your final vote count will appear. Who won the vote?
Place this project on a table and allow your students to vote for their favorite book character. Then reveal the winner!