Single colour LEDs

cable

Single colour LEDs

cable

cable Wire single colour LEDs

A three single colour LEDs are connected to the Raspberry Pi Pico using GP5, GP8, and GP13 each also using the nearest GND pins.
Connect the short leg to GND.
Connect the long leg to a GP pin.

play_circle stop_circle
# Import the LED component
from  picozero import LED

# Set up LEDs with correct pin numbers
pink_led = LED(5)
green_led = LED(8)
red_led = LED(13)

# Control LEDs
pink_led.on()
green_led.off()
red_led.toggle() # change between on and off

bug_report My LED doesn't light

  • Check that the short leg of your LED is connected to GND.
  • Check your connections.
  • Check the pin numbers in your code.