Nayel
DIIDevHeads IoT Integration Server
•Created by aymen ammari on 8/30/2024 in #pcb-and-analog
Incorrect Battery Percentage Reading on MKR 1010 with 3.7V Lithium Battery
Hi Aymen can you add this to your code is for debugging purpose ; void loop() {
int rawADC = analogRead(ADC_BATTERY);
Serial.print("Raw ADC value: ");
Serial.println(rawADC);
Serial.print("Battery voltage is ");
Serial.print(battery.voltage());
Serial.print(" (");
Serial.print(battery.level());
Serial.println("%)");
delay(1000);
}
3 replies