Here we run this from Thonny when connected to a Pico 2 W with micropython on it, and the LED onboard blinks:
Code:
from machine import Pin, Timerled = Pin('LED', Pin.OUT) # onboard LED for pico-wtim = Timer()def tick(timer): global led led.toggle()tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick)Statistics: Posted by neilgl — Sat Mar 29, 2025 1:22 pm