This question already has an answer here:

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

import RPi.GPIO as GPIO


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


Why cant I get this LED to turn off?



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!

marked as duplicate by goldilocks Mar 18 '16 at 14:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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

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.