Show battery state & add low battery notification
A very good feature:
implement a low battery warning and maybe a current battery percentage on the display.
There are a few methods implemented in Arduino/libraries/M5Stack/src/utility/Power.cpp/.h
:
bool isChargeFull();
bool isCharging();
int8_t getBatteryLevel(); //0,25,50,75,100% levels only
bool setVinMaxCurrent(uint8_t cur); //we could change that to faster charging, depending on installed battery