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

General • Turn on/off a series of 12V LEDs

$
0
0
I need to turn on/off up to 8 12V LED's one after each other. I do not need to fade them up just on wait 1 second and off. The code is straight forward

leds = [Pin( 15, Pin.OUT),
Pin( 14, Pin.OUT),
Pin( 13, Pin.OUT),
Pin( 12, Pin.OUT),
Pin( 11, Pin.OUT),
Pin( 10, Pin.OUT)]

for x in range(6):
leds[x].high()
sleep(1)
leds[x].low()


I've seen the wiring diagrams for toggling 12V powered devices with the Pico's 3.3V GPIO pins. It involves a MOSFET or Diode Transistor. I really don't want to wire these up for each LED I have found this which would do what I want but I'd need one of these for each LED (they come in a pack of 10).
61FBEsbaPtL._AC_SL1500_.jpg
Is there a HAT that can be added to the PICO to control 8 or more 12V devices with 8 or more GPIO pins from the Pico or is this board my best best and I will just have to wire one up for each LED?

Statistics: Posted by jeff.davis503 — Wed Jul 03, 2024 9:38 pm — Replies 1 — Views 42



Viewing all articles
Browse latest Browse all 6970

Trending Articles