Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
[Solved] WS2812B Static white color with dimming button
January 17, 2022 5:52 AM
Hi, could someone write a code for me in which the leds are white and can be dimmed with a button? 25% 50% 75% and 100% brightness. Arduino Pro Micro pin 6, 14 leds
January 17, 2022 6:31 AM
What type of LEDs are you using? RGB Led strip? (WS2811 or WS2812)
What did you try yourself so far?
January 17, 2022 6:33 AM
January 17, 2022 6:35 AM
January 18, 2022 5:41 AM
To get white we would indeed need to define red, green and blue, for example:
strip.setPixelColor(Pixel, strip.Color(255, 255, 255));
(the errors mention: "red", "green" and "blue" as not defined)
To dim the white color, you can take different values, eg.
strip.setPixelColor(Pixel, strip.Color(100, 100, 100));
Hope this helps! 😊
January 18, 2022 5:42 AM
p.s. thanks for catching that - I updated the code you linked to as well! 👍