Skip to content

Commit

Permalink
adds function call to set adc resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
rlogiacco authored Jan 22, 2024
1 parent 754f560 commit 762e8ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/HigherADCResolution/HigherADCResolution.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Battery battery(3400, 4200, A0, 12);
void setup() {
Serial.begin(9600);
pinMode(SENSE_PIN, INPUT);
analogReadResolution(12); // switches ADC resolution to 12 bits
while (!Serial);
battery.begin(3300, (R1 + R2) / R2, &asigmoidal);
battery.onDemand(SENSE_PIN, HIGH);
Expand Down

0 comments on commit 762e8ce

Please sign in to comment.