#include <ESP32Servo.h>
Servo myServo;
const int led = 0;
void setup() {
myServo.attach(34);
pinMode(led, OUTPUT);
}
void loop() {
myServo.write(90);
digitalWrite(led, HIGH);
delay(1000);
myServo.write(180);
digitalWrite(led, LOW);
delay(1000);
}
#include <ESP32Servo.h>
Servo myServo;
const int led = 0;
void setup() {
myServo.attach(34);
pinMode(led, OUTPUT);
}
void loop() {
myServo.write(90);
digitalWrite(led, HIGH);
delay(1000);
myServo.write(180);
digitalWrite(led, LOW);
delay(1000);
}