4

I'm new to this whole RP world, and I'm trying to learn it.

I've been trying to follow this post, and connected my Pi this image below

Connection between Pi and Adafruit T-Cobbler Plus

enter image description here

Wiring

enter image description here

Without having to run any code, my LED kept lighting up.


I created a file trying to turn it off.

ledOff.py

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(17,GPIO.OUT)
print "LED off"
GPIO.output(17,GPIO.LOW)

I ran it

sudo python ledOff.py

I got the message to print "LED off" on my CLI , but that about it. LED is still on.

I'm not sure why my GPIO is stuck in a high mode.


I've tried rebooting my pi

sudo shutdown -r now still seeing the same result. :(


Details

GPIO Version : 0.6.0a3

PI OS : Linux raspberrypi 4.1.7v7-aufs


Did I do anything that I'm not suppose to do here ?


Update

I've tried update my GPIO to 0.6.1

$ sudo apt-get update
$ sudo apt-get install python-rpi.gpio python3-rpi.gpio

Try running again, I got the message to print again, but the light is still ON

pi@raspberrypi$ sudo python ledOff.py 
LED off

I'm running out of ideas now, any suggestions will be much appreciated !

  • 2
    Could you check that the ribbon cable between the Pi and the cobbler is inserted correctly? Normally the white stripe would indicate pin 1. Perhaps it needs to be twisted. If you have a meter check that 5V is 5V at the cobbler, not 3V3. – joan Jan 24 '16 at 14:34
  • I'm sorry, what do you mean pin 1 ? – kyo Jan 24 '16 at 14:38
  • Need a twisted ? Should I physically twist it ? or just maybe reverse it to see the different ? – kyo Jan 24 '16 at 14:39
  • I don't have meter yet, I need to get one. You mentioned 5V and 3V3, but I'm sure if I am currently using it right now. I allowed the power to flow directly from pin#17. – kyo Jan 24 '16 at 14:40
  • 1
    I don't think there is any need to update the software, Could you add another photo showing both ends of the ribbon cable as connected. – joan Jan 24 '16 at 15:16
5

The cable is connected wrong. The end on the cobbler is Ok but the end on the RPi needs to be reversed so that the white stripe is next to the RPi's onboard led's. I had this same issue many months ago.

From the manufacturer (Adafruit's) website:

Image of T-shaped GPIO adapter, plugged into a electronics breadboard with a ribbon cable bearing a white-stripe on one side connecting that to a RPi B+ or 2B model - the cable is connected to the latter the opposite way around to the one in the OP's first picture.

  • I have added in a picture to show as per @pxgator says, you have the cable connected incorrectly on the RPi end. You may have been lucky and not broken anything on the RPi or anything semiconductor-ish on the breadboard but that will be a fortunate escape - the corner-most pin on one end of the 40 pin connector is +5V whereas the diagonally opposite one is Ground - swapping them over is not good for anything made out of silicon - otherwise you may have got your question an "rip" tag 8-)! – SlySven Jan 24 '16 at 18:03
  • @pxgator : You're a life saver man ! – kyo Jan 24 '16 at 18:57

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.