Gamify your chain reaction by using a Strawbees grabber connected to Makey Makey to start a timer in Scratch when you grab a conductive egg. Drop the egg on the Strawbees roller coaster track. When the egg rolls into the egg drop, it stops the timer.
Here is what our full project in action looks like!
Supplies:
- Makey Makey Classic
- Strawbees
- STL File to hold Makey Makey onto Strawbees inventions (Thank you Erik T for creating this!)
- Copper tape (or aluminum foil and double stick tape)
- Scratch Game for the Chain Reaction where Makey Makey starts and stops the timer.
Step 1: Build Strawbees Inventions
Build a roller coaster track and mechanical arm or grabber with Strawbees!
Here are some resources to get you started playing with these chain reaction elements:
- The Strawbees roller coaster track tutorial
- Make sure youâve printed this STL File to hold Makey Makey onto your Strawbees inventions. (Thank you Erik T for creating this 3D printing file!)
Step 2: Code a Timer in Scratch and Recorder Variable
To create a timer in Scratch, youâll want to create a variable and name it âSeconds timer.â You need to code your timer to âset to 0â when the green flag is clicked.
To have the timer start with a key press, use the âWhen up arrow is pressedâ hat to trigger the timer. Place a âwait 1 secâ stacking block from the control palette in side a âforeverâ loop and attach a âchange seconds timer by 1â to the âwait 1 sec block. Now Scratch will count up by 1 second forever! This is one quick and easy way to code your own timer.
Youâll want to use another key press to stop the timer. By placing the âif __ thenâ block underneath the âchange timer byâ block, you can tell Scratch what to do if another key is pressed. Find the âkey pressedâ sensing block in the sensing palette. This block checks to see if a specific key is pressed.
So our code in the first image is triggered by the up arrow and changes the timer by 1 every second forever unless the âspaceâ key is pressed. If the âspace key is pressedâ then the timer script is stopped.
To record the time it takes for your egg to drop, you need the following code to set the ârecord time.â For fun we also added a cloud variable, so for now, our way to check if we need to ârecord the timeâ is set to record if it is less than the current longest time of our âlongest time variable.â (This is the code in the second picture)
See our full Scratch game here, and use the code pictures below to help you with your Scratch project.
Step 3: Make Strawbees Grabber Into a Makey Makey Switch
In this step, you are going to make your grabber into a Makey Makey switch! Youâll wire one grabber to the âup arrowâ to start the timer, and the other side of the grabber to âEARTH.â When the two sides pick up the foil covered egg (or ball) it will complete the circuit and start the timer in Scratch.
To wire the grabber, youâll use foil for the hands, and some conductive copper tape to create your wiring. Make sure the two copper traces never touch or you will accidentally set off your circuit. For the hinges, we left the backing on our tape so it could be flexible. (Like a bandaid!)
Then hook one alligator clip to your straw and the âup arrowâ and one alligator clip to the other connection and âEARTH.â
Step 4: Create an Egg Drop Landing Switch
Build your Egg drop lander however you want! Ours was designed by an 11 YO. To wire the landing bed as a switch, use two copper tape traces and connect some foil to the edge of your Strawbees landing pad. Make sure there is an air gap between the two flaps of foil. When the egg lands on the foil, it will press the two pieces together and trigger the âspace keyâ on your Makey Makey.
We used this STL file from Strawbees Inventor Erik Thorstensson to attach our Makey Makey to the Strawbees Egg drop landing pad.
Step 5: Connect Makey Makey to Scratch
Plug in your USB and test your start and stop timer! Here is the whole project described and played during our webinar with Strawbees!
Weâd love to see your projects! Share what you made with an âI made it!â or tag us on social!
Source: Chain Reactions With Strawbees and Makey Makey