Code modification for Version 2 as suggested by Alvaro:
getmVolts() should be modified as follow:
int getmVolts() {
return int((analogRead(Vpin)-analogRead(Apin))*4.8828125); // read the battery voltage
}
Code modification for Version 2 as suggested by Alvaro:
getmVolts() should be modified as follow:
int getmVolts() {
return int((analogRead(Vpin)-analogRead(Apin))*4.8828125); // read the battery voltage
}