I’m playing around with a rpi 2 and an explorerhatpro, but sofar without much success.
I’m getting these errors when importing explorerhat:
import explorerhat
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/explorerhat.py”, line 624, in
_cap1208 = captouch.Cap1208()
File “/usr/local/lib/python2.7/dist-packages/captouch.py”, line 187, in init
self.i2c = SMBus(i2c_bus)
IOError: [Errno 2] No such file or directory
My guess is that ic2 is not enabled properly, however after struggling for 2 days my options are narrowing down…
i’ve followed the instruction to enable i2c and spi via sudo raspi-config in the resulting menu but without success
i’m running the latest raspbian wheezy image for rpi2
I think raspi-config is actually missing some secret sauce, or perhaps not enabling the i2c-dev library properly. The first command @Gisky mentioned should fix it.
It may be that all you actually need from that script is:
sudo modprobe i2c-dev
… which loads the magical i2c modules which makes /dev/i2c-1 available.
But if you do it manually I think you have to do it upon every boot… boo!
I forgot to mention that i had followed toroughly the github instructions. I’ve tried all forums posts from the last month or so (last rpi2 and last firmware) but without success. I’ve tried disabling the device tree and adding the modules manually in config.txt, made sure nothing was blacklisted…
i’ve started from a clean install again yesterday
when i run pimorini i2c’s script, it tells me that i2c is already enabled.
smbus is also already installed.
sudo modprobe i2c-dev returns no error message but i’m still unable to import explorer hat afterwards.
i2cdetect returns this message.
pi@raspberrypi ~ $ i2cdetect 1
Error: Could not open file /dev/i2c-1' or/dev/i2c/1’: No such file or directory
Could it be a faulty hat? leds 1 and 4 are on though…