-
Notifications
You must be signed in to change notification settings - Fork 9
OSError: [Errno 5] EIO OR TypeError: function takes 3 positional arguments but 2 were given #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I do have one module containing 2 8x8 matrix displays. |
You say one module, two LEDs. Which product are you using? The current version of the library was written for two LEDs each with its own controller, so I think what you're seeing is the result of the code trying to talk to what it thinks are two controllers both with the same I2C address. Support for your kind of setup (if I've understood you correctly) is coming in a future release. |
I am trying to find the test/demo code that did work - albeit it displayed only on one of the LED's - which is what the demo claimed to do. |
Thanks for the pic. I think that confirms it. The HT16K33 can support two displays, but most boards only include one display. As I say, I'll look at adding support for setups like yours in a future update. |
Thanks Tony...Will look forward to that release. In the mean time, I have managed to completely loose what I had working. Alternatively, can you please provide me with the modules and the test code that will work on one display? |
Just use the latest version (4.2.0) and use ht16k33matrix in place of ht16k33matrixmulti. The addition of the latter was the only change. |
MPY: soft reboot Traceback (most recent call last): File "<stdin>", line 12, in <module> File "/lib/ht16k33/ht16k33matrixmulti.py", line 24, in __init__ File "/lib/ht16k33/ht16k33matrix.py", line 131, in __init__ File "/lib/ht16k33/ht16k33.py", line 35, in __init__ File "/lib/ht16k33/ht16k33.py", line 95, in power_on File "/lib/ht16k33/ht16k33.py", line 120, in _write_cmd OSError: [Errno 5] EIO
`'''
Adapted from: (Original source)
https://github.com/smittytone/HT16K33-Python
'''
from machine import I2C, Pin, RTC
from ht16k33 import HT16K33MatrixMulti
i2c = I2C(0, scl=Pin(9), sda=Pin(8))
display = HT16K33MatrixMulti(i2c, 2)
display.set_brightness(2).clear()
image = [0x01,0x03,0x07,0x0F,0x1D,0x3F,0x7F,0xEB,0xFF,0x77,0x3E,0x1F,0x0D,0x07,0x03,0x01,0x01,0x03,0x07,0x0D,0x0F,0x07,0x03,0x01,0x01,0x03,0x07,0x0F,0x1D,0x3F,0x7F,0xEB,0xFF,0x77,0x3E,0x1F,0x0D,0x07,0x03,0x01,0x01,0x03,0x07,0x0D,0x0F,0x07,0x03,0x01,0xC1,0xC3,0x07,0x0F,0x0F,0x07,0x03,0x01]
image_bytes = bytes(image)
display.scroll_image(image_bytes)
display.scroll_text("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")
`
The /lib/ht16k33 folder contains all the library modules incl init.py
If I exclude the ",2" in the display object I get the following error:
`MPY: soft reboot
Traceback (most recent call last):
File "", line 12, in
TypeError: function takes 3 positional arguments but 2 were given
`
I fail to determine the cause.
Any suggestions what I could be missing?
The text was updated successfully, but these errors were encountered: