Академический Документы
Профессиональный Документы
Культура Документы
by MakeyMakey
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.
ht t ps://www.yout ube.com/embed/eKxm5u9wyHg
Supplies:
Here are some resources to get you started playing with these chain reaction elements:
ht t ps://www.yout ube.com/embed/f186_3nqnSM
ht t ps://www.yout ube.com/embed/nVLp8KnJYAY
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 le!)
To create a timer in Scratch, you'll want to create a to see if a speci c key is pressed.
variable and name it "Seconds timer." You need to
code your timer to "set to 0" when the green ag is So our code in the rst image is triggered by the up
clicked. arrow and changes the timer by 1 every second
forever unless the "space" key is pressed. If the "space
To have the timer start with a key press, use the key is pressed" then the timer script is stopped.
"When up arrow is pressed" hat to trigger the timer.
Place a "wait 1 sec" stacking block from the control To record the time it takes for your egg to drop, you
palette in side a "forever" loop and attach a "change need the following code to set the "record time." For
seconds timer by 1" to the "wait 1 sec block. Now fun we also added a cloud variable, so for now, our
Scratch will count up by 1 second forever! This is one way to check if we need to "record the time" is set to
quick and easy way to code your own timer. record if it is less than the current longest time of our
"longest time variable." (This is the code in the second
You'll want to use another key press to stop the timer. picture)
By placing the "if __ then" block underneath the
"change timer by" block, you can tell Scratch what to See our full Scratch game here, and use the code
do if another key is pressed. Find the "key pressed" pictures below to help you with your Scratch project.
sensing block in the sensing palette. This block checks
In this step, you are going to make your grabber into a Make sure the two copper traces never touch or you
Makey Makey switch! You'll wire one grabber to the will accidentally set o your circuit. For the hinges, we
"up arrow" to start the timer, and the other side of the left the backing on our tape so it could be exible.
grabber to "EARTH." When the two sides pick up the (Like a bandaid!)
foil covered egg (or ball) it will complete the circuit Then hook one alligator clip to your straw and the "up
and start the timer in Scratch. arrow" and one alligator clip to the other connection
and "EARTH."
To wire the grabber, you'll use foil for the hands, and
some conductive copper tape to create your wiring.
https://youtu.be/eKxm5u9wyHg
Plug in your USB and test your start and stop timer! Here is the whole project described and played during our
webinar with Strawbees!
ht t ps://www.yout ube.com/embed/o5hPi-MihZI
We'd love to see your projects! Share what you made with an "I made it!" or tag us on social!