Mason and I grew up in law enforcement households where the use of firearms is a necessary part of our parents lives. That being said, gun safety was a topic that was embedded I'm our minds from an early age. While a traditional, portable, locked case works well, there is still a lot of room for error. With our motion sensor program you can now be notified if your portable gun safe is opened or even moved from its set location. This adds an extra layer of security to your weapon which in tern cuts the chances of an unwanted incident in half.
As shown in the photos above, Mason's Photon is attached to the PID Motion sensor. This motion sensor is located inside of the gun case so that if it is opened, or even moved, the motion sensor will pick it up instantly. In the final assembly we hid the whole particle system under the desk where the gun safe is to be hidden in this scenario. If someone was to tamper with your case without permission Mason's Photon would send an alert signal to the could within a second and the perpetrator would never have a clue.
Particle.subscribe and Particle.publish functions were imbedded into the two particle codings so that they can efficiently communicate with each other. Specific phrases were assigned to incidents such as "Case opened" or "Case moved" so that the user knows the severity of the situation.
Once the alert signal is sent to the cloud from Mason's particle it is immediately recognized by AJ's particle. The code is picked up and transferred from the cloud to the second particle. This is when IFTTT comes in. Coding in AJ's particle now correlates with an applet built in the IFTTT app. The applet "talks" with AJ's photon and when the alert code is received the applet is notified. At this point IFTTT sends an alert notification to my phone so that I can take action and prevent an incident.
While it might sound counterproductive you can be assured, this whole process happens within seconds. The quick action from all of the instrumentation in this project has the ability to prevent your firearm from getting into the wrong hands.
Finally, we created a second applet with IFTTT so that we can log when the case has been opened or moved. Mason's photon communicates with the Applet using the publish function. Whenever the motion sensor is triggered and the D7 LED pin lights up, the Applet is alerted and is set into motion. It will then send a message to google spreadsheets to add a bar with the chosen value of 1.
Since this project is based around open or closed, we only need to see this value of one, keeping the graph and data analysis simple. More importantly, the graph shows the exact date and time that the case was opened.