With the Heltec Wifi Kit 32, can the power source be obtained programmatically from any API calls?
ie Most of the time the device would be connected to power, but if the power fails, then as it auto switches to run on battery, I would like to change to power saving strategy to enable sleep between measurements, power down WiFi, etc.
I figure I can wire from the incoming power to a digital pin to determine if the mains power is still on, but wanted to know if there was a built in way that would not require sacrificing one of the GPIO pins for the monitoring.
Thanks in advance