1
votes

I am using a Raspberry Pi B+ model out of the box. I have performed the initial setup and am trying to light up an LED using GPIO pin 7. The circuit works when one end of the LED is connected directly to 3.3 Volts and the other to GND through a resistance. Now when I use the following code to light up the LED nothing seems to happen. No Errors but the LED remains unchanged.

import RPi.GPIO as GPIO 
GPIO.setmode(GPIO.BOARD) 
GPIO.setup(7, GPIO.OUT) 
GPIO.output(7,True)

I have tried to "sudo apt-get update" , "sudo apt-get upgrade" . I also tried replacing the GPIO.BOARD to GPIO.BCM and changing the pin to match the BCM number. Could someone also please tell me what BCM stands for ?

I have also tried restarting the device.

1
This question maybe better suited to: raspberrypi.stackexchange.com - EdChum

1 Answers

0
votes

I'll answer "what does BCM stand for?" part of this question: it stands for Broadcom, the company that makes the BCM2835 chip that the Raspberry Pi uses. More info here:

https://raspberrypi.stackexchange.com/questions/12966/what-is-the-difference-between-board-and-bcm-for-gpio-pin-numbering

As for the main part of your question, it might be better asked over at the https://raspberrypi.stackexchange.com/ site: it seems likely that your problem is connected to the electronics of the Pi, rather than your Python code.