# Blink with timer

from machine import Pin, Timer

inbuiltLed = 25
externalLed = 5

led = Pin(inbuiltLed, Pin.OUT)
led1 = Pin(externalLed, Pin.OUT)

timer = Timer()

def ledblink(timer):

    led.toggle()
    led1.toggle()
    
timer.init(freq=2.0, mode=Timer.PERIODIC, callback=ledblink)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT