Xinyuan-LilyGO / LilyGo-LoRa-Series

LILYGO LoRa Series examples
603 stars 169 forks source link

Mesure Volts on pin 35 TTGO 1.6.1 #59

Closed bobo3k closed 1 year ago

bobo3k commented 2 years ago

Hi, I have tried everything (dac, analogRead...) and I never get accurate values out of PIN 35, which should work on a Lilygo T3 V1.6.1 Would you be kind enough to provide a code that allows to get the voltage of the battery (https://www.amazon.es/gp/product/B01KKJP8L6/)? Many thanks in advance, Baudouin

vpmayer commented 2 years ago

Hi, Trie to use the PMU class: AXP20X_Class PMU; this library has this function, PMU.getBattVoltage(); but before use you need to init the chip, pmuInit();

bobo3k commented 2 years ago

Thanks a lot!

I was actually using Pangodream_18650_CL, but it stopped working somehow... I then spotted that the board was faulty, got a replacement, and this same library worked perfectly!

Thaks again!

B

From: Vitor Paganini Mayer Sent: Wednesday, December 29, 2021 12:45 PM To: Xinyuan-LilyGO/LilyGo-LoRa-Series Cc: bobo3k ; Author Subject: Re: [Xinyuan-LilyGO/LilyGo-LoRa-Series] Mesure Volts on pin 35 TTGO 1.6.1 (Issue #59)

Hi, Trie to use the PMU class: AXP20X_Class PMU; this library has this function, PMU.getBattVoltage(); but before use you need to init the chip, pmuInit();

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

lewisxhe commented 1 year ago

There is no activity for a long time. If there is still a problem, please reopen the problem