Looking to add an LED light strip using Servo 2 port. Trying to write code in MicroPython to light it up but can’t Google my way out of it. Anyone have starter code for LED strips on the XRP?
MicroPython has support for NeoPixel LED strips (WS2812) built in: neopixel — control of WS2812 / NeoPixel LEDs — MicroPython latest documentation
There’s also this tutorial written for the ESP8266, but I think should work on the XRP as well: 11. Controlling NeoPixels — MicroPython latest documentation
It would useful to include the MicroPython NeoPixel library in XRPLib and the XRP Code Editor.
Students really, really like to incorporate addressable LEDs in their projects.
The XRP is already running MicroPython, so that NeoPixel library is already available and doesn’t need to be added anywhere else. To demonstrate, I took that example and copied it into XRPCode, changed the pin and number of LEDs, and it works just fine.
Although I suppose that Blockly users currently aren’t able to use the NeoPixel library. @Fgrossman would it be feasible to add blocks for LED strip control?
Great idea. We will look at it for a future release.