#include <ESP32Servo.h>
Servo myservo;
#define pot 15
int value = 0, led_param = 0;;
void setup() {
myservo.attach(14);
Serial.begin(115200);
for (int i = 25; i <= 27; i++) {
pinMode(i, OUTPUT);
}
}
void loop() {
value = analogRead(pot);//read analog input
int s_val = map(value, 0, 4095, 0, 180);
myservo.write(s_val);
Serial.print("Angle = ");
Serial.println(s_val);
}