Touch to Wak up the LCD

Hi,

I am running lvgl code on ESP IDE for WT32-SC01 Plus Touch LCD which has a ESP32 S3 MCU.
I am trying to write a code that puts the LCD to sleep once no touch for 30 seconds. I want the MCU on the lcd module to be running but just simply turn off the lcd screen (make it go black)
Can anyone please help me with this? or any guidance where to look for it?

Thnaks

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