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

MicroPython • Which pin is 'LED' connected to?

$
0
0
I have just started learning python on the pico W.
Looking at a pdf drawing (see attachment) of the pins it says pin GPIO0 is connected to the internal LED

Code:

import machineimport timeled = machine.Pin('LED', machine.Pin.OUT)while True:    led.toggle()    time.sleep(2)
flashes the onboard LED but doesn't alter pin 0 and

Code:

import machineimport timeled = machine.Pin('GPIO1', machine.Pin.OUT)while True:    led.toggle()    time.sleep(2)
puts a toggling 3.3v on pin 0 but doesn't light the LED
Is the pin layout wrong or am I missing something?
Capture.PNG

Statistics: Posted by bob1954a — Thu Feb 12, 2026 11:31 pm



Viewing all articles
Browse latest Browse all 8037

Trending Articles