#include <ESP32Servo.h>
int potentiometer = 0;
int output = 0;
Servo servo_6;
void setup(){
pinMode(4, INPUT);
servo_6.attach(32, 500, 2500);
}
void loop(){
potentiometer = analogRead(4);
output = map(potentiometer, 0, 1023, 0, 180);
servo_6.write(output);
delay(10); // delay a little bit to improve simulation performance
}