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

MicroPython • Cannot get 2nd LED to activate

$
0
0
I’ve got the second LED (red) connected to GP1 and first led (blue) connected to GP0

My current code is

From machine import Pin
from time import sleep

led = Pin(0, Pin.OUT)
led2 = Pin(1,Pin.OUT)

while True:
led.value(1)
led2.value(1)
sleep(1)
led.value(0)
led2.value(0)
sleep(1)

I’m struggling to figure this out thanks.

The black wire is also connected to GND 23 and orange is connected to GND 38 for some reason the wire on 38 is making the circuit turn off when I move the Pico. That’s why there is another in GND 23

Also using 300 Ω resistors

I’m also quite new to all of this stuff

Statistics: Posted by Sillymonkey9822 — Wed Dec 25, 2024 10:10 am — Replies 1 — Views 17



Viewing all articles
Browse latest Browse all 4391

Trending Articles