#define PINREAD A0
void setup() {
// put your setup code here, to run once:
//inizializzare la seriale
Serial.begin(9600);
while(!Serial);
}
void loop() {
// put your main code here, to run repeatedly:
//leggere il valore del pin analogico
float digMeas = analogRead(PINREAD);
float voltMeas = digMeas*5.0/ 1024;
Serial.print("voltage read: ");
Serial.println(voltMeas);
delay(500);
}