Introduction: Makey Makey Lunch Choices

I know that sometimes tallying lunch choices in the morning can slip your mind because you are busy with many other morning procedures and routines in the classroom. By making the Lunch Choice Data Tracker, students will be more enthusiastic and engaged with tapping on their lunch choice. This will help with their responsibility for making their own lunch choice instead of the teacher counting every morning.

In this guide, you will learn how to create a Lunch Choice Data Tracker. You will be creating multiple switches and a counting system in Scratch. Your project will be connected to a Makey Makey to allow it to be interactive for students to use to make a lunch choice each morning. You will be creating variables in Scratch that will represent your lunch choices. You will see that your variables can be as general or as specific as you would like. You will also learn to code how to reset your data tracker for a fresh start each day.

I hope this helps take at least one task off your plate in the morning!

Supplies

If you are planning to mount this lunch choice data tracker onto a bulletin board:

  • Makey Makey kit
  • Index cards
  • Chipboard
  • Scissors/Box Cutter
  • Foil
  • Conductive Copper Tape
  • Gluestick
  • Art supplies of your choice

If you are planning on having the lunch choice data tracker be portable, you need the above supplies plus:

  • Poster board

Programs

  • Scratch

Step 1: Adding Variables in Scratch

  1. Go to the Scratch Website.
    • If you are not signed up, click on Join Scratch.
      • Create a username and password.
    • If you are already signed up, click on Sign In.
  2. Click on Create to code a new Scratch script.
  3. In order to make this easier for you, we will create our variables before we begin coding our Scratch script. Click on Variables.
  4. To add your variables click on Make a Variable. You can add as many lunch choices for your variables as needed. My school has four lunch choices to choose from, so I am going to create 4 different variables: Hot Lunch, Cold Lunch, Salad, and Home Lunch.

Educator Note: What is so great about variables is that you can change them at any time to fit your needs. For example, if I want to be more specific about the lunch choices available, I can add a more specifically named variable. (Hot Lunch= Chicken Patty; Cold Lunch= Ham and Cheese Sandwich; Salad: Caesar Salad; Home Lunch)

Step 2: Coding a Scratch Script

  1. Click on Events. Since we are going to be connecting a Makey Makey to our Scratch project, drag over when space key pressed.
    • Note: You can adjust the key that is used by clicking on the down arrow. I wanted to use the space key for another part of my Scratch script, so you will notice that I chose when up arrow is pressed.
  2. Click on the Control tab, and drag over the if ___ then block.
    • You will notice that there is a hexagonal shape in between if and then.
  3. Click on the Sensing tab, and drag over the key space pressed? over the hexagonal shape until it is highlighted. Drop it into the space.
    • Note: Once again, you can adjust the key that is used by clicking on the down arrow. I wanted to use the space key for another part of my Scratch script, so you will notice that I chose when up arrow is pressed.

  4. Click on the Variables tab, and drag over change my variable by 1. Place it into the if ___ then block.
    • Note: The block may have one of your added variables already part of it. For example, the block may say "change Hot Lunch by 1."
  5. Click on the Controls tab, and drag over the wait 1 second block. Place it under the if ___ then block.
    • Note: You may want to change 1 second to .5 seconds; however, you can test it out, and see if it needs adjusting.
  6. Repeat steps 1-5 depending on the amount of variables (lunch choices) you have at your school.
    • Note: Keep in mind that you must assign a different key per variable. For example, when I click on the left arrow, it will count how many salads are needed. You will notice I created the script four times representing each lunch choice.

Step 3: Coding to Reset Data

Once we start using this Lunch Choice Tracker in class, we are going to need a way to reset the data we collected so we can start fresh with our tracker the next day. This will also be completed in Scratch.

  1. Click on the Events tab, and drag over the when space key pressed block.
  2. Click on the Variables tab, and drag over set my variable to 0.
    • Note: The block may have one of your added variables already part of it. For example, the block may say, "Set Hot Lunch to 0."
  3. Repeat step 2 depending on the amount of variables (lunch choices) you have at your school.
    • Note: Keep in mind that you must assign a different variable to each block. When you click on the space bar or the space key on the Makey Makey, it will clear the data to 0.

Step 4: Staging Your Backdrop and Sprites

Adding a Backdrop

  1. Click on the Stage button at the bottom right of the screen.
  2. Click on the Backdrops tab.
  3. Click on Choose a Backdrop.
    • You will have the options of choosing a backdrop, painting a backdrop, getting a random backdrop, or uploading a backdrop.

Educator Note: You can code your background to change as much as you would like. I kept my background to stay the same since it is just for presentation purposes.

Sprites

  1. Click on the Choose a Sprite button at the bottom right of the screen.
    • You will have the options of choosing a sprite, painting a sprite, getting a surprise sprite, or uploading a sprite.

Educator Note: You can code your sprites to change as much as you would like. I uploaded different sprites to represent the different lunch choices (hot lunch, cold lunch, salad, and home lunch). I also chose to Hide the cat sprite because it was not relevant to my project.

Step 5: Create Index Card Switches for Lunch Choice Tracker

  1. Fold index cards in half to act as the body of your switches. Since I have 4 lunch choices, I will be making 4 switches.
    • Note: I drew my lunch choices on, but you are more than welcome to do whatever you would like. You can draw or print images to represent lunch choices or you can just write the lunch choices on the index cards.
  2. Cut and glue chipboard (thin cardboard) or cardboard to the inside top and bottom of the index card.
  3. Cut and glue a piece of aluminum foil to the top of the index card and chipboard. This will act as our conductor to trigger Earth and our keys to work when the Makey Makey is connected.
  4. Take 8 small strips of index cards and wrap them in aluminum foil.
  5. Glue 2 of each foil connections onto the inside bottom of the index card and chipboard. Make sure that these two foil connections do not overlap/touch or the circuit will not be successful.
  6. There are many ways to connect Earth to the switches, but I decided to use copper foil tape. I connected the foil tape to each of the Earth aluminum connections on the 4 switches and wrapped it around to the back. All switches will connect to Earth by making sure the copper foil tape connects on the back of the poster.

Educator Note: The thickness of the index cards will allow for the index cards to flap open after being tapped. Tapping on these switches will allow the data to increase by one lunch choice.

Step 6: Connecting Switches to Makey Makey

  1. Plug in Makey Makey USB.
  2. Connect alligator clips to the foil connections on your switches. The foil connections for the keys are at the top. Earth is the bottom foil connection.
  3. Connect the other end of each clip to the matching input on the Makey Makey.
    • Note: You can decide which color alligator clip corresponds to which key.
  4. Run Scratch.
  5. Connect one end of an alligator clip to Earth on the bottom of the front side of the Makey Makey.
  6. Connect the other end of the alligator clip onto the copper foil tape on the edge of the poster.
  7. Tap your switch to see if it works.
    • Note: If your Makey Makey lights up when you tap your switches, then you have been successful. If the Makey Makey stays lit, then you have crossed connections somewhere. Try to debug this by checking that the conductors are not overlapping or that your switches are not staying closed instead of flapping open.
  8. When you have finished collecting your lunch data, you can either press the space bar, hold Earth and the space key on the Makey Makey with your fingers, or press your finger down on the copper foil tape and press the space key on the Makey Makey with your fingers. This will clear your data for lunch tracking on the following day.
Work From Home Speed Challenge

Participated in the
Work From Home Speed Challenge