// read potentiometer value

const int potPin = 2; // potentiometer is connected to gpio 

int potValue = 0; // variable for storing the potentiometer value

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  delay(1000);
}

void loop() {
  potValue = analogRead(potPin);
  Serial.println(potValue);
  delay(500); 
}
Loading
esp32-s2-devkitm-1