from machine import Pin , PWM
import time
led_red = PWM(Pin(1 , Pin.OUT))
led_red.freq(1000)
led_green = PWM(Pin(22 , Pin.OUT))
led_green.freq(1000)
led_blue = PWM(Pin(20 , Pin.OUT))
led_blue.freq(1000)
while True:
x , y , z = 0 , 65535 , 33000
while (x < 65535 and y > 0 and z > 0):
led_red.duty_u16(x)
led_green.duty_u16(y)
led_blue.duty_u16(z)
x = x + 265
y = y - 265
z = z - 265
time.sleep(0.1)