Just FYI in the new 1v95, the neopixel module is not part of esp8266, usage is like any other Espruino platform:
// flash an 8 LED neopixel array in a rainbow pattern var led_count = 8; var neoPin = NodeMCU.D4; var rgb = new Uint8ClampedArray(led_count * 3); var pos = 0; function getPattern() { pos++; for (var i=0;i<rgb.length;) { rgb[i++] = (1 + Math.sin((i+pos)*0.1324)) * 127; rgb[i++] = (1 + Math.sin((i+pos)*0.1654)) * 127; rgb[i++] = (1 + Math.sin((i+pos)*0.1)) * 127; } return rgb; } setInterval(function() { require("neopixel").write(neoPin, getPattern()); }, 100);
@user85573 started
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.
Just FYI in the new 1v95, the neopixel module is not part of esp8266, usage is like any other Espruino platform: