Cobbler Wrong GPIO Numbers?

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
maik_kel
 
Posts: 1
Joined: Tue Jan 22, 2013 10:51 am

Cobbler Wrong GPIO Numbers?

Post by maik_kel »

Hello, I'm a total beginner so maybe I'm doing something wrong...

I just recieved my Raspberry Pi Starter Kit with your Pi Cobbler (Pre-assembled).

For testing, I made a simple circuit with a LED and Resistor. This works nicely when I connect to the 3.3v and GND.

I wanted to control this with Python so I connected the GND cable to #18 (From Tutorials on the web) and tried to turn it on using GPIO.setup(18, GPIO.OUT) / GPIO.output(18, True). This didn't do anything, the LED wouldn't light up.

The Only way I can get it to work is when I plug the 3.3V cable into #24 (!). Like that I can control the LED with #18 in Python.

What's wrong here?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Cobbler Wrong GPIO Numbers?

Post by adafruit »

maybe you have it backward or upside down? we know the numbers are correct...check for wiring issues

User avatar
txbobs
 
Posts: 22
Joined: Wed Jan 30, 2013 3:11 pm

Re: Cobbler Wrong GPIO Numbers?

Post by txbobs »

You might have done what I did. I plugged the wrong end of the ribbon cable into the Pi. This meant that the connections on the cobbler were backwards since it has a keyed connector. Be sure the stripe on the ribbon cable is pointed towards pin 1 on the Pi.

User avatar
wbp
 
Posts: 260
Joined: Mon Mar 07, 2011 1:18 pm

Re: Cobbler Wrong GPIO Numbers?

Post by wbp »

One observation - if you connected the ground side of the LED (GND as you say) to pin 18, you would want to set that pin to False to turn the LED on, not True. True would raise the pin's output to high, and there would be no current flow. If you want to use True to run the LED on, reverse the LED and re-connect your GND lead to ground.

Also, what GPIO "setmode" did you use?

William

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”