Has anyone gotten the NeoPixels function working recently. When I try and run it, the first neopixelWrite() works but ones after that seem to be ignored. This is the sample I am using:
var esp8266 = require("ESP8266");
pinMode(D2, "output");
function colorLeds(red, green, blue) {
var data = [];
for (var i=0; i<2; i++) {
data.push(green);
data.push(red);
data.push(blue);
}
esp8266.neopixelWrite(NodeMCU.D2, data);
}
setInterval(function() {
console.log("Changing ...");
colorLeds(Math.floor(Math.random() * 256), Math.floor(Math.random() * 256), Math.floor(Math.random() * 256));
}, 1000);
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Has anyone gotten the NeoPixels function working recently. When I try and run it, the first neopixelWrite() works but ones after that seem to be ignored. This is the sample I am using: