from machine import Pin
from time import sleep
from servo import Servo
# Initialize the servo motor
servo = Servo(25) # Servo connected to GPIO 25
# Move servo to pre-defined angles
while True:
print("Moving to 0°")
servo.move(0)
sleep(1)
print("Moving to 90°")
servo.move(90)
sleep(1)
print("Moving to 180°")
servo.move(180)
sleep(1)