IOError: [Errno 2] No such file or directory

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/

IOError: [Errno 2] No such file or directory

Postby hwiguna » Sun Aug 26, 2012 2:21 pm

I'm following along this tutorial on learn.adafruit.com.
http://learn.adafruit.com/matrix-7-segm ... pi-for-i2c

When I run the example:
sudo pytho ex_8x8_pixels.py

I receive this error:
IOError: [Errno 2] No such file or directory

Typing sudo i2cdetect -y 0 also returns a similar error:
Error: Could not open file '/dev/i2c-0' or '/dev/i2c/0': No such file or directory.

The installation of python-smbus and i2c-tools succeeded. What did I do wrong?
hwiguna
 
Posts: 6
Joined: Wed Nov 16, 2011 9:33 am


Re: IOError: [Errno 2] No such file or directory

Postby hwiguna » Tue Aug 28, 2012 8:48 pm

I was using Raspbian Wheezy and installed packages as outlined in the tutorial.
I've since tried Occidentalis, but my SD card (4GB PNY P-SDHC4G4-GE) doesn't like it. It failed during boot with:
PANIC: VFS: Unable to mount root fs on unknown-block(179,2)

I've checked the md5 on the .img. It matches, so it must be the card. I'll try imaging it from a Windows machine.
hwiguna
 
Posts: 6
Joined: Wed Nov 16, 2011 9:33 am

Re: IOError: [Errno 2] No such file or directory

Postby hwiguna » Fri Aug 31, 2012 10:09 pm

Finally got around to setting up Occidentalis from a Windows PC. The card kept saying that it's write protected eventhough it is clearly NOT in the lock position. Google found this thread about putting a tape over the write protect tab. It worked! Occidentalis is great! I was able to get the I2C to work out of the box. Thanks AdaFruit!
hwiguna
 
Posts: 6
Joined: Wed Nov 16, 2011 9:33 am


Return to Adafruit Raspberry Pi® accessories

Who is online

Users browsing this forum: No registered users and 2 guests

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


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
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[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


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