phoddie / node-red-mcu

Node-RED for microcontrollers
120 stars 18 forks source link

fixed number of neopixels in case of Needle(Number of pixels) #81

Closed kitazaki closed 1 year ago

kitazaki commented 1 year ago

I tested neopixel node with M5Atom Matrix.

in case 1, 2nd pixel changed. in case 2, 3rd pixel changed. ... in case 24, 25th pixel changed. in case 25, not changed.

because of the start number is increased by i++ in fill() function.

216818322-4c556087-3b18-4baf-bba2-6ac85036ef3d

スクリーンショット 2023-02-07 13 24 01

IMG_3810

flows.json << EOL [{"id":"78f89dec3f38dac7","type":"tab","label":"フロー 2","disabled":false,"info":"","env":[],"_mcu":{"mcu":true}},{"id":"e94495a2cf10e3dc","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","_mcu":{"mcu":true},"x":110,"y":180,"wires":[["3205d92df71ebb29"]]},{"id":"3205d92df71ebb29","type":"mcu_neopixels","z":"78f89dec3f38dac7","name":"","pin":"","length":"","order":"RGB","mode":"4","background":"#ff2600","foreground":"#0432ff","wipe":"40","brightness":"20","_mcu":{"mcu":true},"x":320,"y":240,"wires":[]},{"id":"44d33c5767538f22","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2","payloadType":"num","_mcu":{"mcu":true},"x":110,"y":220,"wires":[["3205d92df71ebb29"]]},{"id":"af07b43f96e83e4f","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"25","payloadType":"num","_mcu":{"mcu":true},"x":110,"y":500,"wires":[["3205d92df71ebb29"]]},{"id":"a1ac8aa6541a0c7a","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","_mcu":{"mcu":true},"x":110,"y":260,"wires":[["3205d92df71ebb29"]]},{"id":"2c07c6b55e998920","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"4","payloadType":"num","_mcu":{"mcu":true},"x":110,"y":300,"wires":[["3205d92df71ebb29"]]},{"id":"81147de654b1944a","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"5","payloadType":"num","_mcu":{"mcu":true},"x":110,"y":340,"wires":[["3205d92df71ebb29"]]},{"id":"ee3a7d176b8ca840","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"26","payloadType":"num","_mcu":{"mcu":true},"x":110,"y":540,"wires":[["3205d92df71ebb29"]]},{"id":"0f8ffd18943b459c","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"24","payloadType":"num","_mcu":{"mcu":true},"x":110,"y":460,"wires":[["3205d92df71ebb29"]]},{"id":"7d7aa7e12108e14a","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"23","payloadType":"num","_mcu":{"mcu":true},"x":110,"y":420,"wires":[["3205d92df71ebb29"]]},{"id":"87f65153189eedbc","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"white,1","payloadType":"str","_mcu":{"mcu":true},"x":290,"y":380,"wires":[["3205d92df71ebb29"]]},{"id":"52eb0731f7fc01ba","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"white,5","payloadType":"str","_mcu":{"mcu":true},"x":290,"y":420,"wires":[["3205d92df71ebb29"]]},{"id":"ead45c1292486212","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"white,25","payloadType":"str","_mcu":{"mcu":true},"x":300,"y":540,"wires":[["3205d92df71ebb29"]]},{"id":"26d4c1598dd8811c","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"white,24","payloadType":"str","_mcu":{"mcu":true},"x":300,"y":500,"wires":[["3205d92df71ebb29"]]},{"id":"ec714f2ba8ce8aaf","type":"inject","z":"78f89dec3f38dac7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"blue,1","payloadType":"str","_mcu":{"mcu":true},"x":450,"y":380,"wires":[["3205d92df71ebb29"]]}] EOL