Browse Source

Define ADC_MULTIPLIER for adjustable ADC calculation

pull/2164/head
Snayler 2 months ago
committed by GitHub
parent
commit
50e9456f28
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      variants/heltec_v3/HeltecV3Board.h

5
variants/heltec_v3/HeltecV3Board.h

@ -11,6 +11,9 @@
#ifndef PIN_ADC_CTRL // set in platformio.ini for Heltec Wireless Tracker (2)
#define PIN_ADC_CTRL 37
#endif
#ifndef ADC_MULTIPLIER //default ADC multiplier
#define ADC_MULTIPLIER 5.42
#endif
#define PIN_ADC_CTRL_ACTIVE LOW
#define PIN_ADC_CTRL_INACTIVE HIGH
@ -88,7 +91,7 @@ public:
digitalWrite(PIN_ADC_CTRL, !adc_active_state);
return (5.42 * (3.3 / 1024.0) * raw) * 1000;
return (ADC_MULTIPLIER * (3.3 / 1024.0) * raw) * 1000;
}
const char* getManufacturerName() const override {

Loading…
Cancel
Save