Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
[{"id":"1605b793.585938","type":"debug","name":"twitter output","active":true,"console":"false","complete":"payload","x":190,"y":187,"z":"7c10843a.b24ab4","wires":[]},{"id":"208812e7.780cbe","type":"twitter in","twitter":"","tags":"#wakedino, #bdf2016, bathcamp, #blackgangpi","user":"false","name":"Twitter","topic":"tweets","x":74,"y":244,"z":"7c10843a.b24ab4","wires":[["5a30c653.d2fc28","1605b793.585938"]]},{"id":"5a30c653.d2fc28","type":"trigger","op1":"1","op2":"on","op1type":"nul","op2type":"val","duration":"250","extend":false,"units":"ms","name":"send \"on\"","x":169,"y":334,"z":"7c10843a.b24ab4","wires":[["ad304de8.b2ec6","476d1f70.07b678"]]},{"id":"ad304de8.b2ec6","type":"delay","name":"rate limit","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"4","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":264,"y":245,"z":"7c10843a.b24ab4","wires":[["ae1ad60f.a9b4e8","14ee19f1.ea588e","fec86d2.02e301","31a8a05d.7b9848"]]},{"id":"476d1f70.07b678","type":"debug","name":"trigger result","active":true,"console":"false","complete":"payload","x":346,"y":412,"z":"7c10843a.b24ab4","wires":[]},{"id":"ae1ad60f.a9b4e8","type":"exec","command":"omxplayer DinosaurRoar.mp3","addpay":true,"append":"","useSpawn":"","name":"","x":574,"y":55,"z":"7c10843a.b24ab4","wires":[[],[],[]]},{"id":"14ee19f1.ea588e","type":"delay","name":"","pauseType":"delay","timeout":"2.5","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":571,"y":143,"z":"7c10843a.b24ab4","wires":[["c9a12e33.bb6ec8"]]},{"id":"fec86d2.02e301","type":"switch","name":"","property":"payload","rules":[{"t":"eq","v":"on"},{"t":"eq","v":"off"}],"checkall":"true","outputs":2,"x":477,"y":310,"z":"7c10843a.b24ab4","wires":[["d90fab5a.82e3","94a969d.3246f18"],["d90fab5a.82e3"]]},{"id":"31a8a05d.7b9848","type":"trigger","op1":"1","op2":"0","op1type":"val","op2type":"val","duration":"2.5","extend":false,"units":"s","name":"","x":594,"y":496,"z":"7c10843a.b24ab4","wires":[["c5fa8f79.88504"]]},{"id":"e3532023.f634a8","type":"inject","name":"On","topic":"","payload":"on","payloadType":"string","repeat":"","crontab":"","once":false,"x":226,"y":135,"z":"7c10843a.b24ab4","wires":[["fec86d2.02e301","14ee19f1.ea588e","ae1ad60f.a9b4e8","31a8a05d.7b9848"]]},{"id":"c9a12e33.bb6ec8","type":"change","name":"Switch off","action":"replace","property":"payload","from":"","to":"off","reg":false,"x":738,"y":139,"z":"7c10843a.b24ab4","wires":[["fec86d2.02e301"]]},{"id":"d90fab5a.82e3","type":"function","name":"","func":"if (msg.payload == \"off\")\n\tcontext.state = 0;\nif (msg.payload == \"on\")\n\tcontext.state = 1;\n\nif (context.state == 1)\n{\n\tif (msg.payload == 0)\n\t\treturn msg;\n\telse\n\t\treturn;\n}\nelse\n\treturn;","outputs":1,"x":812,"y":394,"z":"7c10843a.b24ab4","wires":[["b0dfd5cb.4495a8"]]},{"id":"94a969d.3246f18","type":"trigger","op1":"1","op2":"0","op1type":"val","op2type":"val","duration":"250","extend":"false","units":"ms","name":"","x":696,"y":244,"z":"7c10843a.b24ab4","wires":[["d90fab5a.82e3","57f797fc.fd6f3"]]},{"id":"c5fa8f79.88504","type":"rpi-gpio out","name":"Motor","pin":"11","set":"","level":"0","out":"out","x":784,"y":495,"z":"7c10843a.b24ab4","wires":[]},{"id":"b0dfd5cb.4495a8","type":"delay","name":"","pauseType":"delay","timeout":"250","timeoutUnits":"milliseconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1040,"y":395,"z":"7c10843a.b24ab4","wires":[["94a969d.3246f18"]]},{"id":"57f797fc.fd6f3","type":"rpi-gpio out","name":"Eyes","pin":"12","set":"","level":"0","out":"out","x":939,"y":213,"z":"7c10843a.b24ab4","wires":[]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment