Raspberry Pi - LED and Button Projects
What will be the output of this Python code controlling LEDs on Raspberry Pi?
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup([17, 18], GPIO.OUT)
for pin in [17, 18]:
GPIO.output(pin, GPIO.HIGH)
time.sleep(0.5)
GPIO.output(pin, GPIO.LOW)
GPIO.cleanup()