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!

DolbyOver
  • 70
  • 3

1 Answers1

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.

DolbyOver
  • 70
  • 3