Topic: Solved: Optimizing RemoteXY in battery low-power device
Hi there,
First of all: RemoteXY is great! Thank you for this great eco-system!
I am planning to implement a low-power application on a ESP32C3 with BLE.
I have come pretty far and basically everything is working fine. Now I would like to optimize current consumption while no BLE device is connected to the ESP32.
I have activated all the necessary features as stated here: https://github.com/espressif/esp-idf/issues/947
The problem is, that calling the default
remotexy->handler();
function in
void loop()
prevents the ESP32 to enter light sleep. Therefore the current consumption is 30mA instead of <5mA without calling the handler function.
I tried to simply not call
remotexy->handler();
periodically without established connection (
remotexy->isConnected() == false
and I come this far:
https://paste.pics/aa26d4d8dec4634c5bf02b34417b60a3
The current consumption drops to <5mA while no device is connected, which is the desired behaviour.
My intention is to call only the bare minimum handler() portion for establishing a connection periodically and only when BLE device is connected calling the full handler.
Would you kindly help me on this?
Thank you!
Best regards
LeFish