Using Spark Core to Notify When a Door Is Opened
by martin-koekemoer in Circuits > Microcontrollers
981 Views, 9 Favorites, 0 Comments
Using Spark Core to Notify When a Door Is Opened
The spark core and included breadboard is used in combination with PushingBox to send a notification if a door is opened.
Circuitry
The circuit utilizes the fact that current follows the path of least resistance. Hence current will always flow through the breakable connection and only once the connection is broken current flows to the selected pin which will trigger the notification.
The black wire in the schematic is replaced by the white wires in practice. These are connected to plates constructed of aluminum foil and cardboard. One of these plates is attached to the door and the other to the door frame. Hence once the plates do not touch when the door is opened the current flows to pin D5 and a notification is triggered.
PushinBox & Coding
PushingBox:
Go to : https://www.pushingbox.com/
Login with google account
Go to MyServices .. Add Service .. Choose service you prefer
Then go to MyScenarios .. Enter a name and add scenario .. Add action .. Select service you prefer .. Submit information
Use the device id provided by PushingBox in the code
Code:
Code is attached in the text file.
If it is flashed to the core and it starts flashing red just give it time to reconnect to the network and it should work.
Downloads
Install
Attach one plate to the door and the other to the door frame and power the core, using either USB or a battery pack. Try opening the door and see what happens...
For troubleshooting visit:
http://www.sitepoint.com/create-kid-summoning-iot-...
https://www.instructables.com/id/Spark-Core-Send-a-Tweet-sparkio/