import time
from machine import Pin, PWM

# object to describe output Pin 
led = Pin(0)
# object to describe PWM
pwm = PWM(led)

# set frequency of PWm
pwm.freq(1000)

d = [1000, 5000, 10000, 15000, 20000, 30000, 40000, 50000]

while True:
  for i in d:
    pwm.duty_u16(i)
    time.sleep(0.5)

BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT