@matto wrote:
Hi there!
I have problems getting started with the explorerphat.
This is what i get:
import explorerhat
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.5/site-packages/explorerhat/__init__.py", line 692, in
_cap1208 = Cap1208()
File "/usr/lib/python3.5/site-packages/cap1xxx.py", line 275, in init
raise Exception("Product ID {} not supported!".format(self.product_id))
Exception: Product ID -5 not supported!it looks like i2c is fine ...
[root@bender matto]# i2cdetect -l
i2c-1 i2c 3f804000.i2c I2C adapter
[root@bender matto]# i2cdetect 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1.
I will probe address range 0x03-0x77.
Continue? [Y/n] Y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
[root@bender matto]#Technical-reference.md says explorerphat s i2c address is 0x48 ... ok
.
looking into "cap1xxx.py":here we have
DEFAULT_ADDR = 0x28And it is checking for this
SMBus(1).read_byte_data(0x28, 0xFD)which is not present... (Technical-reference.md --> touch-buttons ?!?)
Am i doing something completly wrong here?
Greetings
matto[edit]
i just replaced lines 691-695try: _cap1208 = Cap1208() has_captouch = True except IOError: has_captouch = Falsewith
has_captouch = Falseto bypass that check ...
i still wonder why "except IOError:" does not catch the error ...explorer-hat library tries to catch an IOError, with seems not to existi in python 3.5, so i changed it to a plain "Exception" which workes fine.
Greetings and thanks for this great pi-add-on!
matto
Posts: 5
Participants: 2