Pimoroni Blinkt example. Every Led 1 sec in blue

Pimoroni Blinkt example. Every Led 1 sec in blue

Configure your MQTT broker IP and port.

Use https://github.com/pimoroni/blinkt/blob/master/examples/mqtt.py on your blinkt! node

[{"id":"20d25d9b.ba91a2","type":"mqtt out","z":"8a5aa68e.693178","name":"","topic":"pimoroni/blinkt","qos":"","retain":"","broker":"2a9b9219.5481ae","x":861,"y":420,"wires":[]},{"id":"6838870c.8d1318","type":"delay","z":"8a5aa68e.693178","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":570,"y":350,"wires":[["56ba6573.2823ec","20d25d9b.ba91a2"]]},{"id":"212dcb17.7869d4","type":"inject","z":"8a5aa68e.693178","name":"","topic":"pimoroni/blinkt","payload":"8","payloadType":"str","repeat":"","crontab":"","once":true,"x":117,"y":349,"wires":[["cfc814b6.ee83a8"]]},{"id":"56ba6573.2823ec","type":"debug","z":"8a5aa68e.693178","name":"","active":true,"console":"false","complete":"payload","x":852,"y":321,"wires":[]},{"id":"cfc814b6.ee83a8","type":"function","z":"8a5aa68e.693178","name":"BLINK n","func":"\nfor (var i=0; i<(msg.payload); i++) {\n    node.send({payload:\"rgb,\"+ i + \",0,0,255\"})\n}\n\nif (i==8)   \n{\nnode.send({payload:\"clr\"})\n}\n\nreturn null;","outputs":1,"noerr":0,"x":338,"y":351,"wires":[["6838870c.8d1318"]]},{"id":"2a9b9219.5481ae","type":"mqtt-broker","z":"8a5aa68e.693178","broker":"10.0.200.91","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]
albersag

Flow Info

created 11 months, 2 weeks ago

Node Types

Core
  • debug (x1)
  • delay (x1)
  • function (x1)
  • inject (x1)
  • mqtt out (x1)
  • mqtt-broker (x1)

Tags

  • pimoroni
  • led
  • blue
  • blinkt
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option