from machine import Pin, Timer

led = Pin(25, Pin.OUT)
tim = Timer()
def tick(timer):
    global led
    led.toggle()

tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT