Raspberry Pi - LED and Button Projects
This code aims to blink two LEDs alternately on GPIO pins 10 and 11, but both LEDs stay on simultaneously. What is the likely cause?
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(10, GPIO.OUT)
GPIO.setup(11, GPIO.OUT)
while True:
GPIO.output(10, GPIO.HIGH)
GPIO.output(11, GPIO.HIGH)
time.sleep(0.5)
GPIO.output(10, GPIO.LOW)
GPIO.output(11, GPIO.LOW)
time.sleep(0.5)