from machine import Pin, PWM
import time
PWM_LED = PWM(Pin(13))
PWM_LED.freq(1000)
PWM_LED. duty(0)
while True:
for i in range(0,1024,1):
PWM_LED. duty(i)
time. sleep_ms(2)
for i in range(1022,0,-1):
PWM_LED. duty(i)
time. sleep_ms(1)