Hello, I am making a project based on the DFRobot FireBeetle ESP32 chip. The whole thing is going to be battery powered so I am keen on low power consumption. However, I have come across a problem.
I have two buttons connected to the chip - both of which are supposed to wake up the ESP 32 from sleep, send a message over MQTT and return to sleep. Everything works as expected but not quite.
When the chip is powered up, it draws 13uA of current - which means it's in current.
When I wake up the chip with one of the two buttons (3.3V state when pressed - the MQTT message is sent but the chip does not go to full sleep. The current consumption from then on remains at 1.6mA.
When I press one of the buttons a second time but for a fraction of a second (so that it does not have time to send the MQTT message), the consumption drops to the correct value of 13uA.
I have the impression that the problem lies somewhere in the code but I can't locate it, I'd appreciate any tips !
.
I have two buttons connected to the chip - both of which are supposed to wake up the ESP 32 from sleep, send a message over MQTT and return to sleep. Everything works as expected but not quite.
When the chip is powered up, it draws 13uA of current - which means it's in current.
When I wake up the chip with one of the two buttons (3.3V state when pressed - the MQTT message is sent but the chip does not go to full sleep. The current consumption from then on remains at 1.6mA.
When I press one of the buttons a second time but for a fraction of a second (so that it does not have time to send the MQTT message), the consumption drops to the correct value of 13uA.
I have the impression that the problem lies somewhere in the code but I can't locate it, I'd appreciate any tips !
Code: C / C++