Brightness up to 1024
Closed this issue · 2 comments
gbl1008 commented
Hello!
I made a esp8266 rgb controller wich works fine by the way, but the brightness is too low. Is there any posibility to set the brightness more than 255?
barneyz commented
espalexa has an eight bit unsigned value for brightness = 255 (=100%). ESP8266 uses a twelve bit PWM, so you must multiply the espalexa brightness value by four.
//callback function
void light_callback_example(uint8_t brightness);
{
analogWrite( LED, 4*brightness);
}
https://create.arduino.cc/projecthub/muhammad-aqib/arduino-pwm-tutorial-ae9d71
gbl1008 commented
It worked!
Thank you so much!