I have looked around but I can’t seem to find anything about my problem, I am not that good in code so this may be really simple just that I can’t figure it out.
I have a project with an ESP8266 and an RGB light strip (just a normal LED strip no Neopixel magic) and I want to be able to select a color with the Menu widget and then click a button widget and then the LED strip changing to the “selected color”. that part I have seemed to figure out, what I can’t figure out is how to dim the LED strip with a slider widget.
I came up with some code but it doesn’t seem to work.
I read the value of the slider on V2
then I have preset colors in the cases for the R, G and B. but the brightness doesn’t change if I change the state if the slider.
it didn’t seem to work the brightness didn’t change
and my intent for it is to have different preset colours that I can choose from in the menu instead of using 3 different sliders for RGB, and then just change the brightness with a single slider
I guess it depends where within your sketch you’ve pout these additional lines of code.
Also, your two widgets are working against each other, because you aren’t taking in to account the brightness value when writing the RGB values to the digital pins in BLYNK_WRITE(V1).