trouble setting up i2c

Talk about Adafruit Raspberry Pi® accessories!

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/

trouble setting up i2c

Postby petert1 » 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: 4
Joined: Wed Jan 02, 2013 1:53 pm

Re: trouble setting up i2c

Postby adafruit » Thu Jan 03, 2013 11:12 am

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

Re: trouble setting up i2c

Postby petert1 » 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: 4
Joined: Wed Jan 02, 2013 1:53 pm

Re: trouble setting up i2c

Postby petert1 » Fri Jan 04, 2013 1:42 pm

I switched to occidentalis and it all works fine.

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

Re: trouble setting up i2c

Postby ElectricTom » 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

Postby o0flatus0o » 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


Return to Adafruit Raspberry Pi® accessories

Who is online

Users browsing this forum: No registered users and 1 guest

Stuff to buy from the Adafruit store and links to product documentation!


New Products [113]

Raspberry Pi[82]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
BeagleBone[23]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]