from machine import Pin,PWM
import time
servo=PWM(Pin(16), freq=50)
print("Iniciando Prueba automatica del servomotor")
while True:
print("Moviendo a 0 Grados")
servo.duty(25) #0 Grados
time.sleep(1)
print("Moviendo a 96 Grados")
servo.duty(77) #Aproximadamente 90 Grados
time.sleep(1)
print("Moviendo a 180 Grados")
servo.duty(125) #180 Grados
time.sleep(1)