cable Wire single colour LEDs
Connect the short leg to GND.
Connect the long leg to a GP pin.
# 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.