Replies: 1 comment
-
I have updated the sketch zip file in the previous post so that the LED type (RGBW or RGB) can be specified as well as the LED count. RGBW LEDs require a 32 bit data word, whereas RGB LEDs require 24 bits. For a single LED the setting has no effect. A string of LEDs will require it to be set correctly to get tthe right colour sequences. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This sketch is an adapted SDK example. It has been modified slightly to create an Arduino sketch.
WS2812 pixel arrays can be very bright, so a brightness value has been added. This also allows the maximum current of the pixel string to be managed. To facilitate this change the pattern functions have been modified so they all use RGB values.
It does not use any Arduino libraries:
WS2812.zip
The PIO has been used to good effect to meet the timing requirements of the serial data interface to these LEDs.
Tested with Sparkfun Pro Micro - RP2040 which has a WS2812 LED on GPIO pin 25
Beta Was this translation helpful? Give feedback.
All reactions