#include <ESP32Servo.h>
Servo myservo; //create servo object to control servo
const int LED = 12;
void setup(){
myservo.attach(18);
pinMode(LED, OUTPUT);
myservo.write(180); // Posisi Tutup
// myservo.write(90); // Posisi Buka
}
void loop(){
// myservo.write(180);
// digitalWrite(LED, HIGH);
// delay(1000);
// myservo.write(90);
// digitalWrite(LED, LOW);
// delay(1000);
}