node-red-contrib-monarco-hat example flow

This is an example flow that uses nodes defined in node-red-contrib-monarco-hat package for Monarco-HAT.

For more info please visit Monarco-HAT website.

[{"id":"ea58d4e5.8e81","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"33d7f9ec.fce9ee","type":"monarco-hat-din","z":"ea58d4e5.8e81","name":"","pin":1,"x":500,"y":420,"wires":[["45fb376.91b42c8"]]},{"id":"3dc9c096.4e219","type":"monarco-hat-din","z":"ea58d4e5.8e81","name":"","pin":"2","x":500,"y":480,"wires":[["4e336619.e05408"]]},{"id":"1144f0ed.68ca87","type":"monarco-hat-din","z":"ea58d4e5.8e81","name":"","pin":"3","x":500,"y":540,"wires":[["1118fda6.47562a"]]},{"id":"6930c293.d9cccc","type":"monarco-hat-din","z":"ea58d4e5.8e81","name":"","pin":"4","x":500,"y":600,"wires":[["2357d118.251676"]]},{"id":"d03f64a1.d045d8","type":"monarco-hat-ain","z":"ea58d4e5.8e81","name":"","pin":1,"x":502,"y":208,"wires":[["52e56b2a.162d04"]]},{"id":"bc57df3b.904738","type":"monarco-hat-ain","z":"ea58d4e5.8e81","name":"","pin":"2","x":502,"y":268,"wires":[["f04b07fa.0459a"]]},{"id":"2357d118.251676","type":"debug","z":"ea58d4e5.8e81","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":600,"wires":[]},{"id":"45fb376.91b42c8","type":"debug","z":"ea58d4e5.8e81","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":420,"wires":[]},{"id":"4e336619.e05408","type":"debug","z":"ea58d4e5.8e81","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":480,"wires":[]},{"id":"1118fda6.47562a","type":"debug","z":"ea58d4e5.8e81","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":540,"wires":[]},{"id":"d0586b7e.a8e2d","type":"monarco-hat-dout","z":"ea58d4e5.8e81","name":"","pin":1,"x":310,"y":420,"wires":[]},{"id":"8ccd3754.5a71e","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":440,"wires":[["d0586b7e.a8e2d","feb94fcd.bc904","be5545d9.46ea48","cb241ebb.15378"]]},{"id":"feb94fcd.bc904","type":"monarco-hat-dout","z":"ea58d4e5.8e81","name":"","pin":"2","x":310,"y":480,"wires":[]},{"id":"be5545d9.46ea48","type":"monarco-hat-dout","z":"ea58d4e5.8e81","name":"","pin":"3","x":310,"y":540,"wires":[]},{"id":"cb241ebb.15378","type":"monarco-hat-dout","z":"ea58d4e5.8e81","name":"","pin":"4","x":310,"y":600,"wires":[]},{"id":"26906f3.6eb9d9","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":580,"wires":[["d0586b7e.a8e2d","feb94fcd.bc904","be5545d9.46ea48","cb241ebb.15378"]]},{"id":"db1d50d1.f677c","type":"monarco-hat-aout","z":"ea58d4e5.8e81","name":"","pin":1,"x":312,"y":168,"wires":[]},{"id":"52e56b2a.162d04","type":"debug","z":"ea58d4e5.8e81","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":682,"y":208,"wires":[]},{"id":"f04b07fa.0459a","type":"debug","z":"ea58d4e5.8e81","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":682,"y":268,"wires":[]},{"id":"63c8ac4.9993dd4","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":122,"y":128,"wires":[["db1d50d1.f677c"]]},{"id":"1bb31d3e.52132b","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"5","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":122,"y":168,"wires":[["db1d50d1.f677c"]]},{"id":"b597a0e0.e85bd","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"10","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":122,"y":208,"wires":[["db1d50d1.f677c"]]},{"id":"42c1ad25.8741bc","type":"monarco-hat-cnt","z":"ea58d4e5.8e81","name":"","pin":1,"x":510,"y":720,"wires":[["b6648c9.895f3f"]]},{"id":"1fed54d7.efde6b","type":"monarco-hat-cnt","z":"ea58d4e5.8e81","name":"","pin":"2","x":510,"y":760,"wires":[["5d23dc2b.6512ec"]]},{"id":"b6648c9.895f3f","type":"debug","z":"ea58d4e5.8e81","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":720,"wires":[]},{"id":"5d23dc2b.6512ec","type":"debug","z":"ea58d4e5.8e81","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":760,"wires":[]},{"id":"d942dccb.487758","type":"monarco-hat-led","z":"ea58d4e5.8e81","name":"","pin":1,"x":1152,"y":48,"wires":[]},{"id":"1bb6ddfd.5dc6ca","type":"monarco-hat-led","z":"ea58d4e5.8e81","name":"","pin":"2","x":1152,"y":108,"wires":[]},{"id":"8d2a0c5d.ea509","type":"monarco-hat-led","z":"ea58d4e5.8e81","name":"","pin":"3","x":1152,"y":168,"wires":[]},{"id":"6eb4c3a5.4a56bc","type":"monarco-hat-led","z":"ea58d4e5.8e81","name":"","pin":"4","x":1152,"y":228,"wires":[]},{"id":"9912fab5.1eabc","type":"monarco-hat-led","z":"ea58d4e5.8e81","name":"","pin":"5","x":1152,"y":288,"wires":[]},{"id":"f9841388.f0c2e","type":"monarco-hat-led","z":"ea58d4e5.8e81","name":"","pin":"6","x":1152,"y":348,"wires":[]},{"id":"f907c406.ea74d","type":"monarco-hat-led","z":"ea58d4e5.8e81","name":"","pin":"7","x":1152,"y":408,"wires":[]},{"id":"4d9142e8.721c7c","type":"monarco-hat-led","z":"ea58d4e5.8e81","name":"","pin":"8","x":1152,"y":468,"wires":[]},{"id":"5a50cee8.a0337","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":942,"y":228,"wires":[["d942dccb.487758","1bb6ddfd.5dc6ca","8d2a0c5d.ea509","6eb4c3a5.4a56bc","9912fab5.1eabc","f9841388.f0c2e","f907c406.ea74d","4d9142e8.721c7c"]]},{"id":"89475e88.4f5368","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":942,"y":288,"wires":[["9912fab5.1eabc","d942dccb.487758","1bb6ddfd.5dc6ca","8d2a0c5d.ea509","6eb4c3a5.4a56bc","f907c406.ea74d","4d9142e8.721c7c","f9841388.f0c2e"]]},{"id":"caca6f29.1dea98","type":"monarco-hat-aout","z":"ea58d4e5.8e81","name":"","pin":"2","x":312,"y":308,"wires":[]},{"id":"85819de1.476438","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":122,"y":268,"wires":[["caca6f29.1dea98"]]},{"id":"37ccd228.1676ae","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"5","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":122,"y":308,"wires":[["caca6f29.1dea98"]]},{"id":"e1b51ae0.162cd","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"10","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":122,"y":348,"wires":[["caca6f29.1dea98"]]},{"id":"9290c30a.abfc48","type":"monarco-hat-pwm","z":"ea58d4e5.8e81","name":"","module":1,"channel":"a","x":680,"y":860,"wires":[]},{"id":"81fd5439.9458b","type":"monarco-hat-pwm","z":"ea58d4e5.8e81","name":"","module":1,"channel":"b","x":680,"y":920,"wires":[]},{"id":"72ffdeeb.e0797","type":"monarco-hat-pwm","z":"ea58d4e5.8e81","name":"","module":1,"channel":"c","x":680,"y":980,"wires":[]},{"id":"cce20721.cfeaf","type":"monarco-hat-pwm","z":"ea58d4e5.8e81","name":"","module":"2","channel":"a","x":680,"y":1040,"wires":[]},{"id":"c0d14450.a32f1","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"0.1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":460,"y":880,"wires":[["9290c30a.abfc48","81fd5439.9458b","72ffdeeb.e0797","cce20721.cfeaf"]]},{"id":"5d9c16eb.043ba","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"0.5","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":460,"y":940,"wires":[["9290c30a.abfc48","81fd5439.9458b","72ffdeeb.e0797","cce20721.cfeaf"]]},{"id":"7411d691.4fe37","type":"inject","z":"ea58d4e5.8e81","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":460,"y":1000,"wires":[["9290c30a.abfc48","81fd5439.9458b","72ffdeeb.e0797","cce20721.cfeaf"]]},{"id":"91a5ba5b.5984b","type":"monarco-hat-drv","z":"ea58d4e5.8e81","name":"","ain1_mode":"0","ain2_mode":"0","cnt1_mode":"0","cnt2_mode":"0","rs485_parity":"0","rs485_databits":"3","rs485_stopbits":"1","rs485_baudrate":"3","pwm1_freq":"0","pwm2_freq":"0","watchdog":"1000","x":102,"y":48,"wires":[]},{"id":"700d40d9.d032b","type":"comment","z":"ea58d4e5.8e81","name":"Counter mode must be activated in Monarco HAT configuration node for the CNT nodes to work properly.","info":"Counter mode must be activated in Monarco HAT configuration node.","x":420,"y":680,"wires":[]},{"id":"80e036b1.b1c4a8","type":"comment","z":"ea58d4e5.8e81","name":"PWM frequency must be set in Monarco HAT configuration node for the PWM nodes to work properly.","info":"Counter mode must be activated in Monarco HAT configuration node.","x":430,"y":820,"wires":[]}]

Flow Info

Created 4 years, 10 months ago
Updated 3 years, 5 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • comment (x2)
  • debug (x8)
  • inject (x13)
Other

Tags

  • monarco
  • hat
  • raspberry
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option