using the ESP32 I would like to save power. There are delays in my code I would like to replace with "sleep" however I need a constant BLE connection. I found the following in espressif documentation. The function might be in the Arduino library, but I can't see how to use it. Is there a way to use Modem-sleep using the following library?
" If Wi-Fi/Bluetooth connections need to be maintained, enable Wi-Fi/Bluetooth Modem-sleep mode and automatic Light-sleep feature (see Power Management APIs). This allows the system to wake up from sleep automatically when required by the Wi-Fi/Bluetooth driver, thereby maintaining the connection."
That gitub reference is the source for the entire ESP32. That is not what you need. Low Power stuff is tricky, spend a few weeks researching many approaches and examples. The link to Power Management is good research material, but you will need a library.
Here is the ESP32 docs on it.
Thanks for your reply. I've used sleep mode before, but the mode I used turned off BLE which is not what I need. Was there a link you were suggesting I read?
Thanks. This looks intriguing. I didn't think light sleep would keep BLE connected, but I will give it a try... Maybe I just misunderstood the documentation.