I am new for raspberry, I have raspberry-3 board and I tried following Python code on it. Which I took from here.
import RPi.GPIO as GPIO
import time
def blink(pin):
GPIO.output(pin,GPIO.HIGH)
time.sleep(1)
GPIO.output(pin,GPIO.LOW)
time.sleep(1)
return
GPIO.setmode(GPIO.BOARD)
GPIO.setup(12, GPIO.OUT)
for i in range(0,50):
blink(12)
GPIO.cleanup()
My circuit looks like this,
But this does not blink LED, What is missing here?
Thanks in advance.
python script_name.py
.python my_script.py