Hey, recently i implemented this feature in the project i work on, you can get the inactive time of the screen using lv_disp_get_inactive_time(/*your display object*/)
, the way i use to turn off the lcd was to see if the returned time of the function are >= 30 seconds, if so the main loop of the renderer, where i refresh my screen was ignored, i also set a fade using ledc_set_fade_time_and_start()
from esp-idf to turn the screen smoothly off, and when any activities on the buttons, in your case the touch in the screen, it faded the screen back on and returned to refresh the screen.
1 Like