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

led = 7

while True:
  • 1
    Hello and welcome. Please be so kind to share your program/script you're running. (Note that you can always edit your own question to include that information, no need to go through comments.) – Ghanima Feb 19 '16 at 7:33
  • sorry i paste code in comment – Mangesh Shelke Feb 19 '16 at 7:36
  • i am new here !!! – Mangesh Shelke Feb 19 '16 at 7:37
  • Not a problem, I edited the question for you. You are new to the site, we're here to help you along. Take the tour and visit the helpcenter to see how things work here. – Ghanima Feb 19 '16 at 7:38

It's GPIO.BCM you want. Dot rather than comma.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.