int potPIN=3;
int potval;
float v2;
int dt=500;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(potPIN,INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
potval=analogRead(potPIN);
v2=(5./1023)*potval;
Serial.print("The potval is:");
Serial.println(v2);
delay(dt);
}