from machine import Pin, PWM
import utime
led1 = Pin(10, Pin.OUT)
led2 = Pin(11, Pin.OUT)
pwm_led1 = PWM(led1)
pwm_led2 = PWM(led2)
pwm_led1.freq(1000)
pwm_led2.freq(1000)
while True:
for duty in range (0, 65535, 755):
pwm_led1.duty_u16(duty)
pwm_led2.duty_u16(65535-duty)
utime.sleep_ms(10)
led1.duty_u16(0)
led2.duty_u16(0)