-
Notifications
You must be signed in to change notification settings - Fork 2
/
arduino-test.json
1 lines (1 loc) · 1.45 KB
/
arduino-test.json
1
[{"id":"e47a42d.d6474c","type":"inject","z":"8a9dd6ea.112cc8","name":"0.5s tick","topic":"","payload":"","payloadType":"date","repeat":"0.5","crontab":"","once":false,"x":436,"y":185,"wires":[["31050937.c831c6"]]},{"id":"31050937.c831c6","type":"function","z":"8a9dd6ea.112cc8","name":"Toggle output on input","func":"\n// If it does exist make it the inverse of what it was or else initialise it to false\n// (context variables persist between calls to the function)\ncontext.level = !context.level || false;\n\n// set the payload to the level and return\nmsg.payload = context.level;\nreturn msg;","outputs":1,"noerr":0,"x":644,"y":185,"wires":[["59d95730.93b878"]]},{"id":"6f943d2b.36ed14","type":"arduino in","z":"8a9dd6ea.112cc8","name":"","pin":"2","state":"INPUT","arduino":"45b43ca7.f14e74","x":428,"y":365,"wires":[["9f007ebc.858c1"]]},{"id":"59d95730.93b878","type":"arduino out","z":"8a9dd6ea.112cc8","name":"","pin":"13","state":"OUTPUT","arduino":"45b43ca7.f14e74","x":867,"y":185,"wires":[]},{"id":"9f007ebc.858c1","type":"arduino out","z":"8a9dd6ea.112cc8","name":"","pin":"12","state":"OUTPUT","arduino":"45b43ca7.f14e74","x":738,"y":365,"wires":[]},{"id":"79d3ae42.44cb4","type":"comment","z":"8a9dd6ea.112cc8","name":"button on pin 2","info":"","x":407,"y":445,"wires":[]},{"id":"4a25691c.3ced18","type":"comment","z":"8a9dd6ea.112cc8","name":"led on pin 12","info":"","x":757,"y":300,"wires":[]},{"id":"45b43ca7.f14e74","type":"arduino-board","z":"","device":"COM8"}]