David Harris
Published © GPL3+

Sensor Tag 2 Smart Light

A smart light that responds to remote lighting conditions using Sensor Tag 2 and Raspberry Pi 2.

IntermediateFull instructions provided3,036
Sensor Tag 2 Smart Light

Things used in this project

Story

Read more

Code

Dweetio Sensor Tag Flow

JavaScript
Flow that reads Dweetio data from Sensor Tag 2 to perform an action on the Blinkstick connected to the Raspberry Pi 2.
[{"id":"ece0d13a.131f3","type":"change","z":"9958e62f.66a718","name":"Darkness","rules":[{"t":"set","p":"payload","to":"random"}],"action":"","property":"","from":"","to":"","reg":false,"x":173,"y":189,"wires":[["37cb63cc.c8349c"]]},{"id":"221efe94.dde102","type":"switch","z":"9958e62f.66a718","name":"","property":"payload.light","rules":[{"t":"btwn","v":"0","v2":"10"},{"t":"else"}],"checkall":"true","outputs":2,"x":179,"y":122,"wires":[["ece0d13a.131f3"],["1e0f20ba.e1f0df"]]},{"id":"1e0f20ba.e1f0df","type":"change","z":"9958e62f.66a718","name":"Light","rules":[{"t":"set","p":"payload","to":"black"}],"action":"","property":"","from":"","to":"","reg":false,"x":167,"y":246,"wires":[["37cb63cc.c8349c"]]},{"id":"dd59be6.f22a64","type":"dweetio in","z":"9958e62f.66a718","thing":"","name":"","x":92,"y":66,"wires":[["221efe94.dde102","c738d7c0.38c728"]]},{"id":"37cb63cc.c8349c","type":"blinkstick","z":"9958e62f.66a718","name":"","serial":"","task":"set_color","delay":"500","repeats":"1","duration":"1000","steps":"50","repeat":false,"x":407,"y":154,"wires":[]},{"id":"c738d7c0.38c728","type":"debug","z":"9958e62f.66a718","name":"","active":true,"console":"false","complete":"false","x":394,"y":236,"wires":[]}]

Credits

David Harris

David Harris

1 project • 3 followers

Comments