I've just started out but it looks like the following shows the voltage and mine maxed out at 4.178V, this gradually decreases and I think below 3.6V isn't really usable. You can use this and some testing to determine the percentage of battery.
#include "M5StickCPlus.h"
TFT_eSprite Disbuff = TFT_eSprite(&M5.Lcd);
void setup() {
M5.begin();
M5.Axp.ScreenBreath(8);
M5.Lcd.setRotation(1);
Disbuff.createSprite(240, 135);
Disbuff.setTextColor(TFT_WHITE);
}
void loop() {
Disbuff.fillRect(0, 0, 240, 135, TFT_BLACK);
Disbuff.setCursor(10, 10);
Disbuff.printf("BAT_V: %.3fV",M5.Axp.GetBatVoltage());
Disbuff.pushSprite(0,0);
}
There are other options power functions that may help in this doc:
AXP192 (Power management)
Good luck.