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