I have the LED going into a ground and GPIO 18/number 12. Here is my code.
Code: Select all
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(18,GPIO.OUT)
print "LED on"
GPIO.output(18,GPIO.HIGH)
time.sleep(10)
print "LED off"
GPIO.output(18,GPIO.LOW)I've tried pins other than 18 but no luck. I downloaded pigpio, ran gpiotest and piscope and everything looks good.
What am I doing wrong?