Good idea, so A7 reads 1.75V and the 3.3Pin reads 3.28V.
Then i had the idea that maybe some internal pull-something is enabled and did a pinMode(A7, INPUT) before.
Now the values read: raw: 570.000000, vbat: 3.677419, which i think is quite ok.
This is the code now:
Code:
void loop() {
float raw = analogRead(A7);
float vbat = (raw * 2) / 1023;
vbat *= 3.3;
if (millis() > last) {
Serial.printf("raw: %f, vbat: %f\r\n", raw, vbat);
last = millis() + 30000;;
}
}
Thanks for your help, i think it works now as expected. The Adapter charges with max 500mAh, so it will take a while until full.