Open clickworkorange opened 4 years ago
This is out of scope for the WS2812 library- APA102s don't require any of the Pi-specific gymnastics to generate precise timing signals that WS281x LEDs do.
Running APA102 LEDs is so ridiculously trivial that you shouldn't need a library at all. A thin wrapper around Python's Spidev should suffice.
This is a bit-banged implementation of the APA102 protocol using RPi.GPIO
that will run on any two pins: https://github.com/pimoroni/plasma/blob/devel/library/plasma/apa102.py
If you use SPI hardware it's even simpler.
Your experience with apa102-pi is typical of software built against Adafruit's Blinka compatibility shim- which aims to smooth the gap between Raspberry Pi (and other SBCs) and CircuitPython. It's good for certain use-cases, but minimal dependencies is not one of them.
Edit: Not one to stand behind an "it can't be done" answer, here's a new barebones Python library for driving APA102 pixels either via bit-banged GPIO or SPI: https://github.com/pimoroni/apa102-python
I've been using this library on many projects over the last couple of years, and love its simplicity, flexibility, and lack of dependencies. But now I've been tasked with upgrading a design which uses two DotStar LED strips and was surprised to find that these are apparently not supported by this library?
Edit: For a giggle I tried https://github.com/tinue/apa102-pi, and well... yeah.
All of this, just to send a few bytes over SPI. I won't repeat the stream of profanities it elicited here, but suffice to say: this is not remotely acceptable. So I'm re-opening this in the hope that there's a way to get rpi_ws281x to play nice with the DotStars.