Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7915

Other RP2040 boards • Re: problem light led ws2812 on rp2350 zero

$
0
0
Now putting in some effort rather than drunken posting. :D Assuming the program compiles and tries to do something.

Code:

 ws2812_program_init(pio, sm, offset, WS2812_PIN, 5000000.0, IS_RGBW); ... int couleur = urgb_u32(0x77, 0x77, 0x77); put_pixel(pio, sm, couleur);
The bool rgbw parameter of ws2812_program_init() is never used == IS_RGBW is never used. So we need to take a look at urgb_u32() and put_pixel(). Because in the MicroPython program from the link there is a tricky line:

Code:

sm.put(ar, 8)
Colour data need to be formatted as GRB _and_ shifted 8 bits left (*), then it is pushed into the FIFO. If put_pixel() doesn't do that, it won't work.

(*) Link to relevant MicroPython doc:
https://docs.micropython.org/en/latest/ ... chine.html

Statistics: Posted by katak255 — Wed Dec 24, 2025 2:45 pm



Viewing all articles
Browse latest Browse all 7915

Trending Articles