I recently purchased a Raspberry Pi 2 and I am trying to run a simple a simple Blink program but getting this error:
name error 'BCM' is not defined
This is my script
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO,BCM)
GPIO.setwarnings(False)
led = 7
while True:
GPIO.output(led,1)
time.sleep(2)
GPIO.output(led,0)