#define pinPot A1
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
int value_ADC_Pot = analogRead(pinPot);
Serial.print("Nilai ADC yang terbaca : ");
Serial.println(value_ADC_Pot); //3.31V
float Voltage = (value_ADC_Pot/1023.0)* 5; // Persamaan untuk menconversi nilai adc menjadi voltage
Serial.print(" ==> ");
Serial.print(Voltage);
Serial.println("V");
delay(100);
}