LILYGO-T-OI
LILYGO-T-OI copied to clipboard
Is there a way to monitor the battery level?
Is it possible to monitor the battery level via software?
T-OI already have voltage divider on A0 pin, so you can just use following code to get power data:
float getVoltage() { float floatVoltage = 2 * 3.3 * analogRead(PIN_A0) / 1023; return floatVoltage; }