Essentially, when I run an example or test as part of the matrix11x7 library, it works with one of my modules without the trace cut, but with it it just gives up and outputs
eanaruarima447@raspberrypi:~/matrix11x7-python/examples/tests $ python3 fill-test.py
Traceback (most recent call last):
File "/home/eanaruarima447/matrix11x7-python/examples/tests/fill-test.py", line 5, in <module>
matrix11x7 = Matrix11x7()
^^^^^^^^^^^^
File "/home/eanaruarima447/.local/lib/python3.11/site-packages/matrix11x7/__init__.py", line 68, in __init__
self.display = is31fl3731.IS31FL3731(
^^^^^^^^^^^^^^^^^^^^^^
File "/home/eanaruarima447/.local/lib/python3.11/site-packages/matrix11x7/is31fl3731.py", line 66, in __init__
raise e
File "/home/eanaruarima447/.local/lib/python3.11/site-packages/matrix11x7/is31fl3731.py", line 62, in __init__
self.reset()
File "/home/eanaruarima447/.local/lib/python3.11/site-packages/matrix11x7/is31fl3731.py", line 129, in reset
self.sleep(True)
File "/home/eanaruarima447/.local/lib/python3.11/site-packages/matrix11x7/is31fl3731.py", line 135, in sleep
return self._i2c_write(_SHUTDOWN_REGISTER, not value, bank=_CONFIG_BANK)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/eanaruarima447/.local/lib/python3.11/site-packages/matrix11x7/is31fl3731.py", line 157, in _i2c_write
self.set_bank(bank)
File "/home/eanaruarima447/.local/lib/python3.11/site-packages/matrix11x7/is31fl3731.py", line 148, in set_bank
self._i2c_write(_BANK_ADDRESS, bank)
File "/home/eanaruarima447/.local/lib/python3.11/site-packages/matrix11x7/is31fl3731.py", line 158, in _i2c_write
self.i2c.write_byte_data(self.address, register, value)
OSError: [Errno 5] Input/output error
Make sure your Scroll pHAT HD is attached, and double-check your soldering.
I don’t exactly know what to do here, considering this output is given when your soldering is wrong but the device is clearly popping up in i2cdetect. Help?
The examples are all written to us the stock 0x75. If you cut the track you have edit the code to look for the other address. Did you do that?
You will need to edit the matrix11x7 = Matrix11x7()
.
Too something like, matrix11x7 = Matrix11x7(0x77)
.
I think that’s the line. I don’t have one to test. I’ve done similar with other breakouts like the BME280.
If you use the preformatted text option, the </> , it will wrap your code in code tags and make it easier to read when posted.
Is that what that bubble was for? Frick I had no idea. I’m tired so I’m gonna go back to bed but I’ll try it soon. Thank you again alphanumeric
It didn’t work but I got a new error
eanaruarima447@raspberrypi:~/matrix11x7-python/examples/tests $ python3 fill-test1.py
Traceback (most recent call last):
File "/home/eanaruarima447/matrix11x7-python/examples/tests/fill-test1.py", line 5, in <module>
matrix11x7 = Matrix11x7(0x77)
^^^^^^^^^^^^^^^^
File "/home/eanaruarima447/.local/lib/python3.11/site-packages/matrix11x7/__init__.py", line 68, in __init__
self.display = is31fl3731.IS31FL3731(
^^^^^^^^^^^^^^^^^^^^^^
File "/home/eanaruarima447/.local/lib/python3.11/site-packages/matrix11x7/is31fl3731.py", line 48, in __init__
raise RuntimeError('i2c transport must implement: "{}"'.format(attr))
RuntimeError: i2c transport must implement: "read_byte_data"
I did what you recommended and changed matrix11x7 = Matrix11x7() to matrix11x7 = Matrix11x7(0x77)
Do note changing it to 0x75 and running the code with a module without a trace cut doesn’t work either, so it’s properly soldered and such
It depends on the library for the device. In Python for my bme280 I used
bme280_in = BME280(0x76)
bme280_out = BME280(0x77)
In Micro Python though it’s
bme_in = BreakoutBME280(i2c,0x77)
bme_out = BreakoutBME280(i2c,0x76)
It you e-mail tech support they should be able to tell you the correct statement to enter for that breakout.
Contact Us for Raspberry Pi Technical Support - Pimoroni
I don’t really want to deal with tech support, is there no documentation on that in the library?
I didn’t see any? Best guess is it’s one of these two.
matrix11x7 = Matrix11x7(i2c_address=0x77)
matrix11x7 = Matrix11x7(address=0x77)
Omg thank you so much alphanumeric you just saved me so much hassle
Edit: btw it was matrix11x7 = Matrix11x7(i2c_address=0x77)
1 Like
Nice, this is the file I looked at.
matrix11x7-python/library/matrix11x7/init.py at master · pimoroni/matrix11x7-python
If you want to use them both at once you have to do something like this.
matrix_one = Matrix11x7(i2c_address=0x75)
matrix_two = Matrix11x7(i2c_address=0x77)
And then edit all instances of matrix11x7
in the code.
Yeah I get it now. I was reading the init.py file as well but I was looking at it wrong :p
It can be a bit of trial and error some times. Or sleuthing around in the library files. I try to save stuff like this in a text file crib note. Then when what ever I built last year craps out, I’m not trying to figure it all out again.