led_strip: How to Set Value of W Channel of an RGBW Strip? #522
-
If a LED strip is made up of RGBW LED's—SK6812 RGBW like this for example, how is the W channel value set? The |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Yes, you understand correctly: the white value for RGBW strips is calculated automatically and you cannot set it manually through the library interface. However, if you really need to, you can correct the white values yourself directly in the strip buffer. Something like this: led_strip_install();
...
led_strip_t strip = { ... };
...
led_strip_set_pixel(&strip, 0, rgb_from_values(0, 0, 100));
// here
strip.buf[3] = 255;
...
// display
led_strip_flush(&strip); |
Beta Was this translation helpful? Give feedback.
-
BTW if you need, here is a more complex example of using this component: |
Beta Was this translation helpful? Give feedback.
Yes, you understand correctly: the white value for RGBW strips is calculated automatically and you cannot set it manually through the library interface. However, if you really need to, you can correct the white values yourself directly in the strip buffer. Something like this: