void setup() {
Serial.begin(9600);
}
void loop() {
int potensio = analogRead(A0);
float voltage = potensio * (5.0/1023.0);
int outputValue = map(potensio,0,1023,0,255);
Serial.print("Tegangan = ");
Serial.print(voltage);
Serial.print("\t potensio = ");
Serial.print(potensio);
Serial.print("\t output = ");
Serial.println(outputValue);
delay(3000);
}