#include <ESP32Servo.h>
#define PIN_POTENTIOMETER 35 
#define PIN_SERVO         26 
Servo myServo;
void setup() {
  Serial.begin(9600);
  myServo.attach(PIN_SERVO);  
}
void loop() {
  int analogValue = analogRead(PIN_POTENTIOMETER);
  int angle = map(analogValue, 0, 4095, 0, 180);
  myServo.write(angle);
  Serial.print("Analog value: ");
  Serial.print(analogValue);
  Serial.print(" => Angle: ");
  Serial.println(angle);
  delay(100);
}