Jupiter GPIO Library
The Jupiter System full GPIO library, including:
- GPIO Mode Subflow
- GPIO Write Subflow
- GPIO Read Subflow
- GPIO Pwm Subflow
All of them will appear as subflows once the flow is imported. Despite the subflows have been designed for the Jupiter System (https://www.jupitersystem.it/), they are pretty generic and can be used with any other Raspberry or Raspberry-based platform.
[{"id":"6aeb83fe.e2719c","type":"tab","label":"IO Setup","disabled":false,"info":"Make the initial GPIO setup in this flow."},{"id":"ad91e59d.ae6e88","type":"subflow","name":"Jupiter GPIO Write","info":"A node for writing the Jupiter Boards GPIO pins. It uses the wiringPI library in command line fashion.\n\nConfiguration parameters:\n- \"pin\": the GPIO pin number as a string.\n\nInputs:\n- msg.payload: the GPIO digital value (\"1\" or \"0\").\n\nOutputs:\nNone","category":"","in":[{"x":160,"y":140,"wires":[{"id":"ed73785e.204988"}]}],"out":[],"env":[{"name":"pin","type":"str","value":"0","ui":{"label":{"en-US":"pin"},"type":"input","opts":{"types":["str"]}}}],"color":"#C0DEED","icon":"node-red/inject.svg"},{"id":"72188843.43b148","type":"subflow","name":"Jupiter GPIO Mode","info":"A node for setting the Jupiter Boards GPIO pin mode. It uses the wiringPI library in command line fashion. \n\nThe mode can be one of the following string:\n- \"in\" : digital input mode.\n- \"out\" : digital output mode.\n- \"pwm\" : PWM output mode.\n- \"up\" : internal pull-up enabled.\n- \"down\": internal pull-down enabled.\n- \"tri\" : tri-state mode enabled.\n\nConfiguration parameters:\n- \"pin\" : the GPIO pin number as a string.\n- \"mode\": the GPIO mode as one of the above.","category":"","in":[{"x":200,"y":140,"wires":[{"id":"4f6f6ae4.935224"}]}],"out":[],"env":[{"name":"pin","type":"str","value":"0","ui":{"label":{"en-US":"pin"},"type":"input","opts":{"types":["str"]}}},{"name":"mode","type":"str","value":"out"}],"color":"#C0DEED","icon":"node-red/cog.svg"},{"id":"e90845b1.1d82b8","type":"subflow","name":"Jupiter GPIO Pwm","info":"A node for writing the Jupiter Boards GPIO pins in PWM mode. It uses the wiringPI library in command line fashion.\n\nConfiguration parameters:\n- \"pin\": the GPIO pin number as a string.\n\nInputs:\n- msg.payload: the PWM value (\"0\" to \"1023\").\n\nOutputs:\nNone","category":"","in":[{"x":160,"y":100,"wires":[{"id":"fc1d2e2a.2568e"}]}],"out":[],"env":[{"name":"pin","type":"str","value":"0"}],"color":"#C0DEED","icon":"node-red/trigger.svg"},{"id":"7f672399.81f9bc","type":"subflow","name":"Jupiter GPIO Read","info":"A node for reading the Jupiter Boards GPIO pins. It uses the wiringPI library in command line fashion.\nIt has to be polled with any input (even empty) to provide a result.\n\nConfiguration parameters:\n- \"pin\": the GPIO pin number as a string.\n\nInputs:\n- msg.payload: triggers the flow execution.\n\nOutputs:\n- msg.payload: the GPIO digital value (\"1\" or \"0\").","category":"","in":[{"x":40,"y":80,"wires":[{"id":"134c6ea1.8c13f1"}]}],"out":[{"x":520,"y":60,"wires":[{"id":"96444599.4a1068","port":0}]}],"env":[{"name":"pin","type":"str","value":"0","ui":{"label":{"en-US":"pin"},"type":"input","opts":{"types":["str"]}}}],"color":"#C0DEED","icon":"node-red/inject.svg"},{"id":"6c479ce0.5bff94","type":"exec","z":"ad91e59d.ae6e88","command":"gpio write ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"GPIO Write","x":510,"y":140,"wires":[[],[],[]]},{"id":"ed73785e.204988","type":"function","z":"ad91e59d.ae6e88","name":"Format Paremeters","func":"msg.payload = env.get(\"pin\") + \" \" + msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":140,"wires":[["6c479ce0.5bff94"]]},{"id":"4f6f6ae4.935224","type":"function","z":"72188843.43b148","name":"Format Paremeters","func":"msg.payload = env.get(\"pin\") + \" \" + env.get(\"mode\");\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":140,"wires":[["5b94aab1.9f2454"]]},{"id":"5b94aab1.9f2454","type":"exec","z":"72188843.43b148","command":"gpio mode ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"GPIO Mode","x":550,"y":140,"wires":[[],[],[]]},{"id":"fc1d2e2a.2568e","type":"function","z":"e90845b1.1d82b8","name":"Format Paremeters","func":"msg.payload = env.get(\"pin\") + \" \" + msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":100,"wires":[["c806dc68.7499e"]]},{"id":"c806dc68.7499e","type":"exec","z":"e90845b1.1d82b8","command":"gpio pwm","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"GPIO Pwm","x":510,"y":100,"wires":[[],[],[]]},{"id":"134c6ea1.8c13f1","type":"function","z":"7f672399.81f9bc","name":"Format Paremeters","func":"msg.payload = env.get(\"pin\");\nreturn msg;","outputs":1,"noerr":0,"x":190,"y":80,"wires":[["96444599.4a1068"]]},{"id":"96444599.4a1068","type":"exec","z":"7f672399.81f9bc","command":"gpio read ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"GPIO Read","x":390,"y":80,"wires":[[],[],[]]}]