WS2812B (Neopixel) library for Libmaple using SPI DMA
https://github.com/rogerclarkmelbourne/ … 2_Libmaple
The API is based on the Adafruit library, but most of the code has been written from scratch, as the method of operation is completely different.
Notes.
Will probably only work with WS2812BWS2812BDisplays, touch panels and LEDs…I devices: TOuch panel, TFT panel, SD card. One wire devices: 5xDS18b20 PIR, BUZZER, WS2812b (as a status light). <…> rajdarge Thu Apr 28, 2016 7:28 pm mrburnette wrote:My philoso…View in hardware catalog and not the older WS2812WS2812Displays, touch panels and LEDs…7:01 pm You can just search for an alternative library. There are many neopixel (aka WS2812 ) libraries out there. (I think I successfully used the adafruit neo-pixel library, but…View in hardware catalog , because of the timing constraints caused by using SPI to generate the pulse-train.
The library does not have all the functions of the Adafruit version, e.g. getPixelColor, because the pixel data is not easily accessible. In the longer term getPixelColor could be written, to read the encoded pulsetrain data and extract the pixel colour but I don’t have time to do this at at the moment, and none of the standard examples use it.
the Colour(r,g,b,w) does not make use of the w channel. At the moment I’m not sure how to use the w channel, and I’ll need to reverse engineer the Adafruit library to understand what that channel does.
The normal limitations also apply to this library, e.g. Theoretically the Data In requires a logic high voltage of 0.7 x Vdd. So if Vdd = 5, Vhi needs to be 3.5V which is more than the logic high on a 3.3V system. However in practice this seems to work OK for most people.
References
https://cdn-shop.adafruit.com/datasheets/WS2812.pdf
https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf
http://rgb-123.com/files/WS2812B_VS_WS2812.pdf
