diff --git a/src/helpers/nrf52/T1000eBoard.h b/src/helpers/nrf52/T1000eBoard.h index 9511706b..24584757 100644 --- a/src/helpers/nrf52/T1000eBoard.h +++ b/src/helpers/nrf52/T1000eBoard.h @@ -29,12 +29,16 @@ public: uint16_t getBattMilliVolts() override { #ifdef BATTERY_PIN + #ifdef PIN_3V3_EN digitalWrite(PIN_3V3_EN, HIGH); + #endif analogReference(AR_INTERNAL_3_0); analogReadResolution(12); delay(10); float volts = (analogRead(BATTERY_PIN) * ADC_MULTIPLIER * AREF_VOLTAGE) / 4096; + #ifdef PIN_3V3_EN digitalWrite(PIN_3V3_EN, LOW); + #endif analogReference(AR_DEFAULT); // put back to default analogReadResolution(10);