Get ready for your New Year's Party with our DIY Party Pack!
In the previous class, you learned about sequencing and the secret code block, but what if you want a sequence that isn't in the dropdown menu? In this class, we will show you how to create a variable and create your own sequence! Plus, you'll learn some great cardboard tips to boot.
Crafting a Secret Code Invention |
Need to revisit the the previous class? New to our classes and want to see more resources? Let's build a secret code machine! You can make your cardboard invention look however you would like! Our cardboard machine mimics an old school typewriter. (Have you ever seen one?)
To get started, grab some cardboard, some heavy duty scissors, paperclips, and brass fasteners. Maker Tip: Sometimes you might prefer coding your project and then making it. If that's you, skip down to the coding step and come back to this step after you've written your code. In this cardboard build, we are going to share three of our favorite cardboard techniques!
Scoring CardboardTo score cardboard, use scissors or a handy tool like this Canary Cardboard Cutter. Make sure to cut only halfway through the cardboard. Then you can fold and create great angles with your cardboard! Curving CardboardCreate a smooth bend in your cardboard by bending it on the back of a chair. Press over chair and ease your cardboard into a nice curvy shape! We love this tip from maker educator Erin Riley! Head to her site, if you want even more cardboard techniques! Using Binder Clips to Hold ShapesYou can form your cardboard and either hot glue shapes together or use binder clips to hold shapes in place. After you use hot glue on cardboard, binder clips are a great way to temporarily hold pieces together until the glue dries. Pro Tip: If you don't want to use hot glue, Tacky Glue is a great glue for holding cardboard together! Check out this Full Video of Cardboard Build |
|
Coding Musical Notes |
We built a space ship project for this project. Head to Scratch and click "Remix" to code this space synth! We've added a virtual Makey Makey and built the costumes for your synth. You can always start from Scratch if you want though! (Get it? Start from Scratch?) Click on this link and click "Remix" to code this project.Note: You need to be signed in to Scratch see the "Remix" button. The virtual Makey Makey is already coded for key press inputs and the Scratch cat is programmed to move on key presses too. All you need to do is code the music and the secret code for the synth sprite! Click on the Synth Sprite to code the music notes. On our project, we've already added the Makey Makey Extension and the Music extension! When you use the music extension you have access to all 88 keys of the piano and some fun instruments. Pick an instrument and have it set w"when the green flag is clicked." Then code each keypress to play a note. We used:
|
|
Coding a Costume Change |
Now that you have the music notes coded, code the synth sprite so the costume changes for each key press! Make sure to match the key press with the correct color costume. Scratch cat is already coded to move to the correct color block when the arrow keys or spacebar is pressed. |
Creating a Variable and Setting Your Sequence
|
In our last class, you learned how to use the "secret code" hat. Now you are going to create a variable so you can create your own sequence for your secret code.
Now use the "Set variable to" block and type in the sequence of key presses you would like to use. You can find your own song to code or use or sequence to play the song from "Close Encounters." (It's a cool old movie about communicating with aliens through music tones.) Once you've set your sequence, you can drag the variable into the Makey Makey secret code extension and use it to broadcast to other sprites, or just set the code you would like to happen once the sequence is pressed in order. We used this "Close Encounter" variable to broadcast a message to the Giga sprite. Once you've set the sequence for "Close Encounter" you can use it to trigger Giga to appear with when the sequence is played in the correct order. |
|
Using your Sequence to Trigger Special Effects |
Once you set your sequence, you can use it to trigger all types of special effects. Here is the how we coded Giga to react to the correct sequence. Now that you know how to create your own sequence, what special effects will you code?
|
|
Putting it All Together |
Now that your secret code machine is built and you've created your code, it is time to put it all together! Connect Makey Makey inputs to the brass fasteners on your cardboard invention, plug in the red USB, and share your project! Create a color coded sheet music example so your player knows the secret code. (We included the Makey Makey hookup in this crafting cardboard video. Click below to start hooking up your invention. Troubleshooting Tips: When you use the Secret Code hat, test your code with the keyboard to make sure the code is working. If the sequence isn't working make sure you have exactly one space between the key names in the variable value. Once it works on the keyboard, it is time to test your invention. Notice that when you hook up your invention, your conductive inputs might be more sensitive than a computer keyboard. That's why we used paperclips and simple drawings for these projects. A pressure sensitive switch tends to send more than one key press signal to the computer. |
|