int analogPin = 3; int RdVal = 0; float Vx = 0.0; void setup() { // put your setup code here, to run once: analogReference(DEFAULT); // Arduino 5 V Serial.begin(9600); Serial.println("Arduino Voltage meter"); Serial.println(" "); } void loop() { // put your main code here, to run repeatedly: RdVal = analogRead(analogPin); Vx = float(5.0)*(float(RdVal)/float(1023)); delay(2000); // Serial.print(RdVal); Serial.print(" Tensione letta: "); Serial.println(Vx); }