So I got an RPi and a canakit, I'm trying to follow a guide to get a simple program to make the LED blink. I have very little experience with RPis so it's probably a very simple error, but I can't figure out why it won't work. When I run the program I get a runtime error. I will post pictures of my wiring as well as the code. Thanks!
import RPi.GPIO as GPIO import time #blink function def blink(pin): GPIO.output(pin, GPIO.HIGH) time.sleep(1) GPIO.output(pin, GPIO.LOW) time.sleep(1) return #Use raspberry pi board numbers GPIO.setmode(GPIO.BOARD) #GPIO output channel GPIO.setup(pin, GPIO.OUT) for i in range(0,50): blink(11) GPIO.cleanup()