from machine import Pin,PWM
import time
from servo import Servo

servo = Servo(22)
while True:
    # Test the function
    servo.set_angle(0)    # set to 0°
    time.sleep(1)
    servo.set_angle(90)   # set to 90°
    time.sleep(1)
    servo.set_angle(180)  # set to 180°
    time.sleep(1)