jgarff / rpi_ws281x

Userspace Raspberry Pi PWM library for WS281X LEDs
BSD 2-Clause "Simplified" License
1.79k stars 623 forks source link

Question: Any chance of a port of this library to MicroPython? #539

Open Phr3d13 opened 6 months ago

Phr3d13 commented 6 months ago

Am wanting to rewrite an old toy project I have to MicroPython to be run on a pi pico w, but not wanting to have to redo all the LED related code.

Gadgetoid commented 6 months ago

It’s possible, but would probably take more effort than just rewriting your code… and the end result would have very limited utility.

Roughly none of the code in this library would be applicable to, or even particularly well suited to MicroPython though some of the concepts - using a symbol LUT to efficiently parse bits into an SPI stream- would port well. Assuming you need this at all - RP2040/PIO can just stream out the right bit timings and makes a mockery of the workarounds here.

TLDR: Unless you’re volunteering to write the port (sounds like you have the motivation and a great test case!), I wouldn’t bet on it.