This project was part of the Lane Tech HS Physical Computing Lab course. I created this project as part of the Sensors and Me Project.Summary
This device has two main functions. One is to recognize that a box or snack has left the device and the second is to notify me through an email that the device has been triggered and a snack has left.Wiring
I first started by setting up my wiring and connecting the wires from the metal touch sensor to the bread board which includes the Particle argon. The set up looks like the following:
In order for the metal touch sensor to detect if the box (for this prototype) has moved, something metal must be touching the sensor. What I decided to do was take the box and tape a piece of aluminum foil (any metal foil work just as well). The box is taped shut at the bottom because I deconstructed it at first and then had to re-assemble it. I recommend keeping the bottom of the box intact so you don't need to tape it. With the tape and foil the box looks like this :
It is important to leave some of the foil hanging out from the bottom in order to wedge the sensor between the foil and the box itself. The reason for wedging it is because the weight of the snack will force pressure down on the sensor which will the touch the foil below it. From top to bottom it should go box, sensor, then foil.
I used IFTTT.com to create an applet in order for the Argon. Select Particle and have it check for a variable. After choosing the variable that represents wether the snack is missing or not ( in my code the variable i'm referring too is int value), select Gmail. The following parameters should look like the following:
Once you press save, connect the applet which will send you an email every time the sensor reads low.Tips
Use a IDE and or a Serial Monitor. I used a Arduino IDE in order to test wether the sensor was reading properly. When the serial monitor output is HIGH, it means the sensor detects that it is touching something metal. If it reads LOW, the sensor is not touching something metal.