I would like to retain variables and resume where I left off upon awakening, and it looks like Light Sleep mode is good for that. But there is little out there explaining the details of how to implement it. If you know where to find the details, please post a link here.
I haven’t experimented with light sleep on ESP32.
I’m not sure if it is implemented on Arduino IDE. There are solutions for light-sleep on ESP-IDF.
Take a look at the following resources that might help:
Yes, I got light sleep to work in Arduino IDE with:
and in Setup I allowed wakeup by time and button press:
esp_sleep_enable_timer_wakeup(SleepSecs * uS_TO_S_FACTOR);
esp_sleep_enable_ext0_wakeup(WAKEPIN,0); //1 = Low to High, 0 = High to Low. Pin pulled HIGH