from machine import Pin, PWM
from time import sleep, sleep_ms
servo = PWM (Pin(21), freq = 50) # Equivale a 20 ms
servo2 = PWM (Pin(19), freq =50)
led1 = (Pin(18), Pin.OUT)
led2 = (Pin(22), Pin.OUT)
led3 = (Pin(23), Pin.OUT)
while True:
for i in range(1800, 4900):
servo.duty_u16(i)
servo2.duty_u16(i+3100)
sleep_ms(1)