#include <ESP32Servo.h> // Include the servo library
Servo Nisal; // Create a servo object
int servoPin = 18; // Define the GPIO pin to which the servo is connected
void setup() {
Nisal.attach(servoPin); // Attach the servo on GPIO 18 to the servo object
}
void loop() {
Nisal.write(0);
delay(1000);
Nisal.write(90);
delay(1000);
}