This project is about a door sensor that will be used as a safety feature within households with a minimalistic design. It uses two Particle Photon 2's, one as a sender and another as a receiver in a separate location, to send an output signal when the door sensor device is triggered. A joystick is used in the door trigger to ensure that movement in the door occurs rather than movement that may occur around a door due to other sensor mechanics. In the receiving set a LED light is used to signify the door has been triggered.
How Does the Joystick Sensor Work?The joystick sensor is directly connected to the Photon 2 device. The joystick in this project will read the y-axis data. As the joystick is flicked up then a value that is greater than 2032 will be present. If the value of the joystick is less than 2032 then the joystick has been flipped down. These values are then sent to the cloud.
How Does the LED Turn On?The LED is also connected to the Photon 2 directly with wires. The Photon is coded to turn on the LED when the joystick reaches a threshold. Once that threshold of over 2500 is hit, then the light will turn on. The joystick will be flicked by the door causing that value to be sent to the cloud. The Photon connected to the LED will subscribe to that value and trigger the light to be turned on. The video below is a great demonstration on how it works.
We used google sheets to integrate our code in order to send data from the second Particle Photon 2. It receives the trigger from the output sensor and then converts it into amount of times opened within a single date. We decided to have our data in terms of days as the door is opened regularly and there is already a LED sensor to display exactly when the door opens for the security purposes it is intended for.
Comments
Please log in or sign up to comment.