Cogless Pixel Drivers for P2
There are many applications that use just a few smart pixels, and in those cases we can save a cog when using the P2. Attached are drivers for 1-wire (WS2812b, et al.) and 2-wire (APA102c) pixels. Both use inline PASM, and the 2-wire driver uses Smart Pin SPI to generate the output.
These drivers work like Schmarschmino drivers: you change the pixels (with object methods or directly in the app), then call the show() method to refresh the pixel string. Some 1-wire pixels swap the red and green bytes in a color, so there is a swap flag as part of the show() method in that driver.
These are minimalist drivers -- not fancy, but they work well and don't need a cog. I'm using them in a couple of work projects.
Updated: 25 OCT 2023