ph1p / ikea-led-obegraensad

ESP32/Arduino hack for the ikea OBEGRÄNSAD led wall lamp
MIT License
578 stars 78 forks source link

linear brightness control via web server #102

Closed Elump closed 4 months ago

Elump commented 4 months ago

The brightness of LEDs is not a linear function. E.g. changing PWM from 1/255 to 2/255 will roughly experience a doubling of the amount of light for our eyes. Check https://en.wikipedia.org/wiki/Gamma_correction for more details.

I added square root function to correct brightness control input done via web server. This is a good enough correction to control low brightness.

ph1p commented 4 months ago

Thank you :)