Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

General • Re: Issue with ports or me?

$
0
0
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



Viewing all articles
Browse latest Browse all 8082

Trending Articles