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/

Cobbler Wrong GPIO Numbers?

by maik_kel on Tue Jan 22, 2013 11:08 am

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?
maik_kel
 
Posts: 1
Joined: Tue Jan 22, 2013 10:51 am

Re: Cobbler Wrong GPIO Numbers?

by adafruit on Thu Jan 24, 2013 2:09 pm

maybe you have it backward or upside down? we know the numbers are correct...check for wiring issues
User avatar
adafruit
 
Posts: 11705
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Cobbler Wrong GPIO Numbers?

by TxBobS on Wed Jan 30, 2013 3:38 pm

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.
TxBobS
 
Posts: 8
Joined: Wed Jan 30, 2013 3:11 pm

Re: Cobbler Wrong GPIO Numbers?

by wbp on Thu Feb 07, 2013 1:12 pm

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
User avatar
wbp
 
Posts: 226
Joined: Mon Mar 07, 2011 1:18 pm