Closed sago35 closed 6 months ago
My main motivation was to create an example of running WS2812 on waveshare-rp2040-zero. However, adding the new variation required many changes, so I created this PR. Going forward, this example will work without changes as long as machine.WS2812 is defined.
I have tested the following for verification and confirmed that at least the build is successful.
tinygo build -o /tmp/out.uf2 -target arduino ./examples/ws2812/
tinygo build -o /tmp/out.uf2 -target digispark ./examples/ws2812/
tinygo build -o /tmp/out.uf2 -target qtpy ./examples/ws2812/
tinygo build -o /tmp/out.bin -target m5stamp-c3 ./examples/ws2812/
tinygo build -o /tmp/out.uf2 -target thingplus-rp2040 ./examples/ws2812/
tinygo build -o /tmp/out.uf2 -target waveshare-rp2040-zero ./examples/ws2812/
Thank you for the improvements @sago35 and to @aykevl for review. Now merging.
The WS2812 example had variations due to its dependency on led and the different PIN names used. With this PR, boards with WS2812 now have
machine.WS2812
available. This PR makes the following changes:machine.LED
(as some variations don't havemachine.LED
)machine.WS2812
where it is defined