adafruit / Adafruit_CircuitPython_NeoPixel_SPI

SPI driven CircuitPython driver for neopixels.
MIT License
21 stars 11 forks source link

Pros and cons of using this versus Adafruit_CircuitPython_NeoPixel? #35

Closed dasl- closed 1 year ago

dasl- commented 1 year ago

Hi there. I'm working on a project for controlling ws2812b LEDs from a raspberry pi 4. I'm wondering what the pros and cons are of using this driver library versus https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel .

In case it's relevant, I'll be controlling approximately 600 ws2812b LEDs with a desired frame rate of 30 FPS. I will want the pi to have audio output simultaneously.

I also saw another LED driver library: https://github.com/rpi-ws281x/rpi-ws281x-python - I am curious about the pros and cons of that, but perhaps that is outside the scope of asking here 😅

Thanks for any insight you can provide!

tekktrik commented 1 year ago

They appear to be mostly identical, except for slight differences of how you interact with it (SPI vs Pin), plus one has built in context manager functionality. You should be able to use either, I believe. I unfortunately can't speak to the non-Adafruit library.

Since this is primarily used for issue tracking, I'm going to close this issue. But if you have any follow up questions, please feel free to use the Adafruit Forums for official customer support or community support using the Adafruit Discord server.

dasl- commented 1 year ago

thank you. I will be using cpython. I did some more research and it seems like the Adafruit_CircuitPython_NeoPixel and Adafruit_CircuitPython_NeoPixel_SPI libraries, by virtue of using Blinka, are essentially wrappers of the rpi-ws281x-python library (Blinka relies on rpi-ws281x-python internally from what I can tell).

Thus im thinking my best bet will be to simply use rpi-ws281x-python directly, since I am using cpython anyway.

caternuson commented 1 year ago

Agree with everything above and not much more to add, but just FWIW, there's some discussion about this in the associated guide: https://learn.adafruit.com/circuitpython-neopixels-using-spi

And just to be clear, this library does not use or rely on the rpi-ws281x library. The non-SPI version w/ Blinka does.