I have a new touchphat attached to a raspberry pi 3.
and i2c is enabled.
i get the following error on importing touchphat:
Traceback (most recent call last):
File “touchphattest.py”, line 1, in
import touchphat
File “/usr/lib/python3/dist-packages/touchphat/init.py”, line 13, in
dh = cap1xxx.Cap1166(i2c_addr=0x2c)
File “/usr/lib/python3/dist-packages/cap1xxx.py”, line 283, in init
self.product_id = self._get_product_id()
File “/usr/lib/python3/dist-packages/cap1xxx.py”, line 469, in _get_product_id
return self._read_byte(R_PRODUCT_ID)
File “/usr/lib/python3/dist-packages/cap1xxx.py”, line 494, in _read_byte
return self.i2c.read_byte_data(self.i2c_addr, register)
OSError: [Errno 121] Remote I/O error
Also, i just tried it with another raspberry pi 3. and it worked completely fine.
So it is an hardware issue on the raspberry pi 3 that i was using before? Any hints on fixing that? (assuming its fixable)
It’s a hardware fault then. Unless you can see some physical damage thats easily repairable, I don’t think there is much you can do to fix it? You didn’t maybe plug your pHat in one row off on the GPIO or something? I’d reattach it to the not working Pi one more time, if it still doesn’t work I think your SOL as far as using i2c on that Pi goes. And there may other bits not working as well, depending on what chip is damaged etc.
that must be it.
other hats which dont use i2c are working on that raspi. so i think may be only i2c is broken.
anyways thanks a lot for your replies @alphanumeric !
Yeah, the Pi doesn’t have a BIOS in the traditional sense, like a PC does. The firmware is on the Micro SD card. So enabling hardware is for the most part done via the config.txt.
If i2c works on one Pi with that Micro SD card, its enabled and all the software is in place to make it work.
Not working with that same Micro SD card in another same model Pi means something is broken hardware wise. We know its not the phat because that works with the good Pi. If you only just bought that Pi I’d see about returning and or getting a replacement for it. I don’t think its anything you did.