Xinyuan-LilyGO / LilyGo-LoRa-Series

LILYGO LoRa Series examples
603 stars 169 forks source link

How to measure battery level? #17

Closed andrecurvello closed 4 years ago

andrecurvello commented 4 years ago

Hello,

There is any example on how to measure the battery level of hte TTGO T-Beam?

Thank you.

andrecurvello commented 4 years ago

False alarm...

jhon-andrew commented 4 years ago

@andrecurvello I also have the same question. Have you found any guide to measure the battery level?

jangrewe commented 3 years ago

Use the "official" library: https://github.com/lewisxhe/AXP202X_Library/blob/master/src/axp20x.cpp#L325 I get stuff like this:

Battery Connected: true       
Battery Charging Enabled: true
Battery Charging: true        
Battery Voltage: 4.19 V       
Battery Percentage: -4 %
Battery Charge Current: 300 mA
Chip Temp: 18.4 C°