// potentiometer is connected to GPIO 34
const int potPin = 34;
// variable for storing the potentiometer value
int potValue = 0;
// float converted_value;
void setup() {
Serial.begin(115200);
delay(1000);
}
void loop() {
//Readng potentiometer value
potValue = analogRead(potPin);
float result = potValue * (5./4095);
Serial.print("Analog value: ");
Serial.println(result);
delay(500);
}