void
setup() {
Serial.begin(9600);
}
void
loop () {
int val = analogRead(batteryPin);
\xA0// Diabazei thn timh poy dinei to h mpataria.
float volts = (val / 1023.0) *
referenceVolts;
// ypologizo thn analogia
Serial.println(volts);
// Emfanizo ta volts ths mpatarias.
}