from machine import Pin, PWM
from time import sleep
freq= 50 #frequencia em hearts
Servo= PWM(Pin(23), freq)
while True:
for i in range(585, 40, -1):
Servo.duty(i)
sleep(0.015) #15 milisegundos
for i in range(41, 585, 1):
Servo.duty(i)
sleep(0.015)
#40 é 0° 58.5 é 90°