I too would like to know the answer to this question. Seems reasonably done with PWM, but probably already available via one of the libraries that is in control of the display.
Blindly searching through all the code I found a promising function you may want to check out. I'm in the middle of some deeply involved troubleshooting otherwise I'd explore this. See if the setBrightness function is what you're looking for.
lcd.setBrightness(128);
The range appears to be 0~255.
See documentation comments here:
This is an embed external element. It can be deleted using the delete key or the backspace key. To view the full element, press the preview button below.
This is an embed external element. It can be deleted using the delete key or the backspace key. To view the full element, press the preview button below.
Comments
I too would like to know the answer to this question. Seems reasonably done with PWM, but probably already available via one of the libraries that is in control of the display.
Blindly searching through all the code I found a promising function you may want to check out. I'm in the middle of some deeply involved troubleshooting otherwise I'd explore this. See if the
setBrightness
function is what you're looking for.lcd.setBrightness(128);
The range appears to be 0~255.
See documentation comments here:
Using LovyanGFX — LovyanGFX documentation
https://lovyangfx.readthedocs.io/en/latest/02_using.htmlGitHub - lovyan03/LovyanGFX: SPI LCD graphics library for ESP32 (ESP-IDF/ArduinoESP32) / ESP8266 (ArduinoESP8266) / SAMD51(Seeed ArduinoSAMD51)
https://github.com/lovyan03/LovyanGFX