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/

trouble setting up i2c

by petert1 on Thu Jan 03, 2013 12:31 am

I followed the steps in Lesson 4 . GPIO Setup but can not get the bus to work.

My R Pi is 512MB Model B with mounting holes and the 2012 /09/18 distro.

I have a MCP23008 connected per the GPIO Expander project with the Cobbler

Here is what I get at the terminal when looking for connected devices :

i2c-tools is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 168 not upgraded.
pi@raspberrypi / $ sudo i2cdetect -y 1
Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory
pi@raspberrypi / $ sudo i2cdetect -y 0
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory


any suggestions?
petert1
 
Posts: 8
Joined: Wed Jan 02, 2013 1:53 pm

Re: trouble setting up i2c

by adafruit on Thu Jan 03, 2013 11:12 am

are you using occidentalis?
User avatar
adafruit
 
Posts: 11511
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: trouble setting up i2c

by petert1 on Thu Jan 03, 2013 7:59 pm

Not using occidentalis.
Using 2012 - 09 - 18 - wheezy raspberian.
I plan to get occidentalis with my next order as it seems appropriate for the things I have in mind.

Exercise 4 referred to 2012-10-28 Raspberian so I was hoping it might work with what I have.
petert1
 
Posts: 8
Joined: Wed Jan 02, 2013 1:53 pm

Re: trouble setting up i2c

by petert1 on Fri Jan 04, 2013 1:42 pm

I switched to occidentalis and it all works fine.

Thanks for the tip.
petert1
 
Posts: 8
Joined: Wed Jan 02, 2013 1:53 pm

Re: trouble setting up i2c

by ElectricTom on Wed Jan 09, 2013 1:03 am

Just for the record, I had a similar problem setting up the i2c communication on wheezy just the other day. I ran across a website (http://www.skpang.co.uk/blog/archives/575) that explained that on the new Raspbian distro, the i2c driver is installed but disabled. What you can do is just edit the file responsible using the following unix command:

sudo nano /etc/modprobe.d/raspi-blacklist.conf

Then comment out the i2c line (below) by putting a # in front (you can do the same for the spi line if you use that):

#blacklist i2c-bcm2708

It worked fine for me.
ElectricTom
 
Posts: 1
Joined: Mon Nov 12, 2012 1:46 am

Re: trouble setting up i2c

by o0flatus0o on Fri Apr 05, 2013 11:30 am

I had a similar issue as well. I am running Raspian "wheezy" and after following all the instructions I was still getting the error. I issued the following command and it seemed to solve my issue. Not sure if this was the "correct" thing to do though.

"sudo mknod /dev/i2c-0 c 89 0"
o0flatus0o
 
Posts: 1
Joined: Fri Apr 05, 2013 11:16 am