import time
import machine
# print(machine.Pin(2))
p23 = machine.Pin(2, machine.Pin.OUT)
led = machine.PWM(p23)
print(led)
def pulse(l, t):
    for i in range(20):
        l.duty(int(math.sin(i / 10 * math.pi) * 500 + 500))
        time.sleep_ms(t)

pulse(led, 50)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT