Skip to content

led_strip: How to Set Value of W Channel of an RGBW Strip? #522

Answered by UncleRus
Xylopyrographer asked this question in Q&A
Discussion options

You must be logged in to vote

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);

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Xylopyrographer
Comment options

Answer selected by UncleRus
Comment options

You must be logged in to vote
1 reply
@Xylopyrographer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants