Aircoookie/Espalexa

Brightness up to 1024

Closed this issue · 2 comments

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?

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

It worked!
Thank you so much!