#include <ESP32Servo.h>
Servo servo;
int potPin = 34;
void setup() {
servo.attach(16);
}
void loop() {
int potValue = analogRead(potPin);
int servoAngle = map(potValue, 0, 4095, 0, 180);
servo.write(servoAngle);
delay(15);
}