// Potentiometer is connected to GPIO34 (Analog ADC1_CH6)
const int potPin = 34;
float potValue = 0;
void setup() {
Serial.begin(115200);
delay(1000);
}
void loop() {
potValue = analogRead(potPin);
Serial.printf("PotValue : %.2f\n",potValue);
Serial.printf("0.00, 3.30 %.2f\n",potValue*3.3/4095); //คำนวนค่าvolt คูณ3.3หาร4095
delay(500);
}