0

I Set up one LED on GPIO port 17 and turned it on with the following code :

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(17,GPIO.OUT)

GPIO.output(17,GPIO.HIGH)
GPIO.output(17,True)

This code successfully turned on my LED. Now I cant get it off....even if I reboot the RPi 2. Here is the script I have tried running to turn it off :

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(17,GPIO.OUT)

GPIO.output(17,GPIO.LOW)
GPIO.output(17,False)

Why cant I get this LED to turn off?

https://drive.google.com/file/d/0B-ClPiKcnxirNTZldGdsbmhyc3lWd1k5QnhldklBbFBGMS04/view

https://drive.google.com/file/d/0B-ClPiKcnxirdHZJa05VQ2RaWDR2S29MU1NtQXF1VnhTTWlZ/view

The first image I reversed the LED so you can see the picture better so the led is off.

The second picture I removed the LED.

It was difficult to take a picture with the led on!

  • Have you tried using a different pin? – Patrick Cook Mar 18 '16 at 7:23
  • 1
    Which pin are you using? Could you post a photo of your connections? – joan Mar 18 '16 at 8:53
  • Okay I added some pictures – DolbyOver Mar 18 '16 at 9:53
  • I can't access your pictures without a consent process. Can you repost them into the question using the add image tool next to the formatting options? – goobering Mar 18 '16 at 11:14
  • Okay I added consent to the images. Try them now. – DolbyOver Mar 18 '16 at 13:00
0

The GPIO Cable was plugged in backwards causing the LED to stay on. You want the GPIO cables lined side to be facing the SD port. Then everything will work!

Thanks to goobering for helping solve this.

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