Have you ever wondered if the cookies or other snacks in your jar have been taken by a roommate or friend without you knowing? Now with this cookie jar security system, you can see if and when your jar has been opened, and ward off thieves with warning lights. In order to build this system, two particle devices were used: a Photon and an Internet Button.How it works: Internet Button
The Internet Button has an accelerometer build into it. This feature is used to detect the opening motion of the jar. When a tilt of the jar is detected of a higher value than 19 degrees, yellow LED lights on the outside of the Internet Button flash as a warning. Anytime the jar is opened at a degree higher than 25, red LEDs flash on the Internet Button and the event is published to the particle cloud. This event is then displayed on a Google sheet connected to your particle cloud.
The second photon with the LED is wired to visually alert the owner if someone is opening the jar or has opened the jar. The LED photon is subscribed to the Internet Button via a particle.subscribe function. This means anytime the Internet Button detects a tilt of above 25 degrees it will tell the second photon to blink the LED.
How it works: Graphing
When the jar is opened, this information is published to particle, which is then logged in this Google sheets page. This is logged through the app If This Then That (IFTTT) in which an applet was made to do this function. Below is an the current graph.