Skip to content

Instantly share code, notes, and snippets.

@matisok
Created September 15, 2015 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matisok/e7c24b88ec4d77c5a7ae to your computer and use it in GitHub Desktop.
Save matisok/e7c24b88ec4d77c5a7ae to your computer and use it in GitHub Desktop.
Chicken Coop Door opener with Lego RCX

Pretty specific bit of flow. Mostly for my own reuse. :)

[{"id":"b69f94c8.496068","type":"rpi-gpio out","name":"","pin":"16","set":true,"level":"1","out":"out","x":466,"y":66,"z":"c3aed0d3.3ce58","wires":[]},{"id":"716c2eb5.8e93d","type":"rpi-gpio in","name":"","pin":"37","intype":"up","read":false,"x":106,"y":312,"z":"c3aed0d3.3ce58","wires":[["e30c3bc7.1cf3c8"]]},{"id":"7cc51837.833ae8","type":"trigger","op1":"0","op2":"1","op1type":"val","op2type":"val","duration":"1","extend":false,"units":"s","name":"On_Off","x":291,"y":100,"z":"c3aed0d3.3ce58","wires":[["b69f94c8.496068"]]},{"id":"e30c3bc7.1cf3c8","type":"switch","name":"","property":"payload","rules":[{"t":"eq","v":"0"}],"checkall":"true","outputs":1,"x":293,"y":312,"z":"c3aed0d3.3ce58","wires":[["28456688.d7ba9a"]]},{"id":"cf301043.30cff","type":"inject","name":"Evening","topic":"Down","payload":"","payloadType":"date","repeat":"","crontab":"30 20 * * *","once":false,"x":126,"y":228,"z":"c3aed0d3.3ce58","wires":[["24cc7b99.db3384"]]},{"id":"28456688.d7ba9a","type":"function","name":"message","func":"msg.payload = \"The door opened at \"+(new Date()).toString();\nreturn msg;","outputs":"1","noerr":0,"x":474,"y":323,"z":"c3aed0d3.3ce58","wires":[["7242729.f8dbd8c"]]},{"id":"fcd02e80.032fd","type":"rpi-gpio out","name":"","pin":"18","set":true,"level":"1","out":"out","x":476,"y":260,"z":"c3aed0d3.3ce58","wires":[]},{"id":"24cc7b99.db3384","type":"trigger","op1":"0","op2":"1","op1type":"val","op2type":"val","duration":"50","extend":false,"units":"ms","name":"On_Off","x":304,"y":226,"z":"c3aed0d3.3ce58","wires":[["fcd02e80.032fd","13a77a4b.ec5886"]]},{"id":"c4389784.3bc768","type":"rpi-gpio in","name":"","pin":"32","intype":"up","read":false,"x":109,"y":405,"z":"c3aed0d3.3ce58","wires":[["a2a2b34a.5d5d5"]]},{"id":"ccdb3ed5.3324c","type":"function","name":"message","func":"msg.payload = \"The door closed at \"+(new Date()).toString();\nreturn msg;","outputs":"1","noerr":0,"x":466,"y":414,"z":"c3aed0d3.3ce58","wires":[["9954a064.66ab6"]]},{"id":"a2a2b34a.5d5d5","type":"switch","name":"","property":"payload","rules":[{"t":"eq","v":"0"}],"checkall":"true","outputs":1,"x":282,"y":408,"z":"c3aed0d3.3ce58","wires":[["ccdb3ed5.3324c"]]},{"id":"348ba0d8.cb746","type":"comment","name":"Lego Up","info":"The relay triggers a button push on\nthe Lego Mindstorms RCX unit which \nstarts motor and after motor has \nopened door completely (measured with\nrotation sensor) the RCX return a\nsignal through a relay to the Rpi and \nnode-red.","x":620,"y":67,"z":"c3aed0d3.3ce58","wires":[]},{"id":"340870f5.cbf79","type":"comment","name":"Lego Down","info":"The relay triggers a button push on\nthe Lego Mindstorms RCX unit which \nstarts motor and after motor has \nclosed door completely (measured with\nrotation sensor) the RCX return a\nsignal through a relay to the Rpi and \nnode-red.","x":617,"y":217,"z":"c3aed0d3.3ce58","wires":[]},{"id":"b0ffa63.f4f0058","type":"rpi-gpio out","name":"","pin":"22","set":true,"level":"1","out":"out","x":299,"y":154,"z":"c3aed0d3.3ce58","wires":[]},{"id":"d78ebff.f28714","type":"comment","name":"Food","info":"The relay for 220v electric fence. ","x":617,"y":133,"z":"c3aed0d3.3ce58","wires":[]},{"id":"a3bf3571.5c40c8","type":"go","name":"","x":119,"y":99,"z":"c3aed0d3.3ce58","wires":[["7cc51837.833ae8","b0ffa63.f4f0058"]]},{"id":"9954a064.66ab6","type":"twitter out","twitter":"","name":"Tweet","x":647,"y":419,"z":"c3aed0d3.3ce58","wires":[]},{"id":"7242729.f8dbd8c","type":"twitter out","twitter":"","name":"Tweet2","x":640,"y":323,"z":"c3aed0d3.3ce58","wires":[]},{"id":"13a77a4b.ec5886","type":"rpi-gpio out","name":"","pin":"22","set":true,"level":"1","out":"out","x":476,"y":199,"z":"c3aed0d3.3ce58","wires":[]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment