Snack Jar Alarm with ShakeUp

Learn to make a snack jar alarm with ShakeUp to protect your snacks!

Written By: Cherie Tan

Dash icon
Steps icon
Sick and tired of your snacks going missing? Then this guide is for you!

 In this guide, you will learn to make a snack jar alarm with the ShakeUp, by using a simple but cool Scratch trick together with some conductive tape and alligator clips. 

Complete this guide to protect your snacks.

Step 1 Examine your snack jar

Take a look at your snack  jar. 
Does it have a lid that can be twisted and/or lifted off?
Where does the lid meet the rim?

Step 2 Paste conductive tape

If so, attach conductive tape around the rim of the lid where it meets the top of the jar.

Step 3 Attach thin jumper wire lead to conductive tape

Use a jumper cable! Connect it to the conductive tape.

Step 4 Attach alligator clip to jumper cable

Get out an alligator clip and attach it to the end of the wire as shown.

Step 5 Clip alligator clip to ShakeUp space input

Next, attach the other end of the alligator clip to the ShakeUp's 'Space' input

Step 6 Add conductive tape to jar

Now add more conductive tape. Attach a piece of conductive tape as shown in the picture, where it runs from the inside all the way to the outside of the jar. 
Make sure the two lines of conductive tape meet.

Step 7 Attach another alligator clip

Add another alligator clip to the lot. Attach one end of the alligator clip to the conductive tape you just added to the jar.
Then make sure the other end of the alligator clip, is attached to 'Earth' on the ShakeUp.

Step 8 Scratch

Connect the ShakeUp to your computer by using a microUSB cable
Open up the Scratch editor.
Grab a 'when green flag is clicked' block from 'Events'. 
Then grab a 'forever' block from 'Control. 
Next, get an 'if ... then ... else ... ' block. Place this under 'forever' block. 
Next, create a condition! We want to make it so that when the space input is pressed (lid attached to jar), no sound is played from the alarm. So get out a 'key space pressed?' block from 'Sensing' tab. 
Then from 'Sound' tab, get 'stop all sounds' block and place it in 'if'. 
Next, get a 'play sound ... until done' block and place this under 'else'. 
Finally, you can record your own alarm sound by clicking on 'record ... ' as shown in the second picture. Now when the lid is taken off, your treats are safe from harm as the alarm will sound.
You can download the Scratch code, here: Snack Jar Alarm Project.sb3 

Replace the sound with your own recorded sound.