It's a straightforward port of Adafruit's CircuitPython DotStar library. Which was originally a port of a MicroPython Neopixel library - it's come full circle!
Previously APA102 control was only supported via a port-specific module on the ESP8266. This library ought to work on all ports.
The only real change was to strip out the SPI comms from within the CircuitPython driver. Now an SPI object is required to create a DotStar object. (This is a better design anyway IMO)
Code: Select all
spi = SPI(sck=Pin(12), mosi=Pin(13), miso=Pin(18)) # Configure SPI - note: miso is unused dotstar = DotStar(spi, 1) # Juse one DotStar dotstar = (128, 0, 0) # Red
This hasn't had a lot of testing - I only have DotStar 'strips' of length=1 - so I'd appreciate any feedback!
The pins selected match those used in the TinyPICO in case you're wondering.