Unfortunately it doesn't work, I am trying pin #21 but nothing happens.
I have tried the following code on Pyton, saved it under LED.py and run it with sudo python LED.py but nothing happens.
P.S: Longer pin is on the same side as the resistor.
Code: Select all
import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(21,GPIO.OUT) print "LED on" GPIO.output(21,GPIO.HIGH) time.sleep(1) print "LED off" GPIO.output(21,GPIO.LOW)