From d580850d4f08f2451995cbd9c0a37af57f963972 Mon Sep 17 00:00:00 2001 From: Sottosistema W10 Date: Tue, 14 Sep 2021 22:23:10 +0200 Subject: [PATCH] Modify ADC Battery Reading --- src/TTGO_T-Beam_LoRa_APRS.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/TTGO_T-Beam_LoRa_APRS.ino b/src/TTGO_T-Beam_LoRa_APRS.ino index 8086bc7..f400481 100644 --- a/src/TTGO_T-Beam_LoRa_APRS.ino +++ b/src/TTGO_T-Beam_LoRa_APRS.ino @@ -365,8 +365,10 @@ void batt_read(){ #ifdef T_BEAM_V1_0 BattVolts = axp.getBattVoltage()/1000; InpVolts = axp.getVbusVoltage()/1000; +#elif T_BEAM_V0_7 + BattVolts = ((float)analogRead(35) * 7.221 / 8192); // fixed thanks to Luca IU2FRL #else - BattVolts = analogRead(35)*7.221/8192; // fixed thanks to Luca IU2FRL + BattVolts = analogRead(35)*7.221/4096; // fixed thanks to Luca IU2FRL #endif }