Java control of WS2811 / WS2812 LED Strips (aka NeoPixels)

diozero has included support for NeoPixel LEDs via a JNI wrapper of Jeremy Garff's excellent rpi_ws281x library for sometime now. Unfortunately this only works on the Raspberry Pi, annoying given that diozero is intended to be platform independent.
I'd read that it was possible to control such LED strips via SPI, investigating this further had been on my to-do for sometime given that it could final allow for a truly platform independent library for LED strips. I quickly hacked together some Java code based on a loose port of Jeremy's SPI code and tested it out last night, to my surprise it worked first time on one of my old Pi Zeros:


I am in the process of adding this to diozero, hopefully this code will work on all of the other devices that diozero supports. I'll also need to look into including support for 5050 / Adafruit DotStar / WS2801 / APA102 LED strips.

Comments

Popular posts from this blog

Adding a custom library to Arduino IDE

Remote communication options