ESP32 light/modem sleep

Hello,

Could anyone tell me when ESP32 light or modem sleep will be implemented in the Arduino IDE?

Thanks

What does it mean « Implemented in the IDE »?

Ians:
Could anyone tell me when ESP32 light or modem sleep will be implemented in the Arduino IDE?

I dont know which specific feature you are asking about, but the software that allows you to program the ESP32 in the Arduino IDE is produced and supported by Expressif and not the Arduino project.

So perhaps best to direct questions to Expressif.

Sorry my mistake.
I did get my information from Expressive, but I misread it. I read in a post there that, “Arduino doesn't currently enable these features”, and thought it meant that it would have to be implemented in the Arduino IDE, but its expressive that have to implement it.

Apologies

Why don't you just try ?

Here is a tutorial on how to use deep sleep feature on ESP32 with the Arduino IDE. It calls

esp_deep_sleep_start();

The Espressif website describes the sleep modes here:

Once wakeup sources are configured, application can enter sleep mode using esp_light_sleep_start() or esp_deep_sleep_start() APIs.

So you can just try to change esp_deep_sleep_start() for esp_light_sleep_start() in the sketch from the tutorial and see if it compiles.

lesept:
So you can just try to change esp_deep_sleep_start() for esp_light_sleep_start() in the sketch from the tutorial and see if it compiles.

Thanks, I did in fact try that, I used the deep sleep example with light sleep as you mentioned. It compiled but didn’t sleep, printed the “This will never be printed” in the serial Monitor.

It was a wild guess, sorry it didn't work...
You should try to see if Neil Kolban or Andreas Spiess have proposed something about light sleep for ESP32. Just Google "kolban esp32 sleep" or "spiess esp32 sleep". Also have a look at Neil Kolban's book on ESP32, which is available online and is very rich.

@lans try:

void setup() {
Serial.begin(115200);
}

void loop() {
Serial.println("light_sleep_enter");
esp_sleep_enable_timer_wakeup(1000000); //1 seconds
int ret = esp_light_sleep_start();
Serial.printf("light_sleep: %d\n", ret);
}

@mlinaje

Thanks a lot, I'll give it a try

The commands provided by Expressif as part of their core for the Arduino IDE such as;

esp_light_sleep_start();

Do work for me.