// Name of ADC channel
int pot1;
float pot1_volt;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, welcome to test");
}
void loop() {
// put your main code here, to run repeatedly:
pot1 = analogRead(34);
pot1_volt = (float) pot1 * 3.3 / 4095; // using 12 bit & Vref 3.3 Volt
Serial.print("Nilai ADC : ");
Serial.print(pot1); // show ADC Value
Serial.print("\t");
Serial.print("Nilai ADC Tegangan: ");
Serial.println(pot1_volt); // Show Voltage od ADC
delay(300);
}