#include "ESP32Servo.h"
Servo myservo;
int potpin = 34;
int val;
void setup() {
myservo.attach(19);
}
void loop() {
val = analogRead(potpin);
val = map(val, 0, 4095, 0, 180);
myservo.write(val);
delay(15);
}