Back to Parent

Process

Initially I set up the circuit and code to test the Hall Effect Sensor and make sure the output LED displayed the correct color.  After successfully accomplishing that task I modified the code for publishing and integration with IFTTT. During this process I realized that just publishing the event in the if-else loop was telling the photon to continuously publish 'Vacant' and 'Occupied' when the LED was green and red respectively. But I wanted the photon to publish the event just once in each case. I had to create two more variables to store and change the state of the hall effect sensor in order to publish the event just once. 

After publishing to the particle cloud I integrated the hack with IFTTT to send push notifications on my phone. This was relatively straightforward. I used the following tutorial : https://community.particle.io/t/beginner-tutorial-ifttt-monitor-a-device-status-trigger/9406?redirected=true

After getting the notifications to work the next step was to test it to see if it will actually work in the context it was made for. I hooked up the circuit board to the door frame and attached a magnet to the door and tested it. It actually worked!


Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0