-
Notifications
You must be signed in to change notification settings - Fork 54
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
Dual displays no longer functional on newest library version #34
Comments
I've been able to confirm, returning to version 0.0.4 I am able to have both displays use the same DC port. Version 1.0.0 and latest 1.0.1 return the error mentioned above. |
This is a fundamental issue with the GPIO Character Device ABI on Linux, and how it (arguably correctly) handles mutually exclusive ownership of pins. That said, it should be possible to work around it by providing the same "pin" object to each instance of the display driver. Unfortunately it currently doesn't support that, since it does: st7789-python/st7789/__init__.py Line 154 in f7b386e
It should be reasonable to modify the library to check if dc = gpiodevice.get(dc, "st7789-dc", OUTL)
display1 = st7789(0, 0, dc)
display2 = st7789(0, 1, dc) |
Allow the same pin instance to be passed into multiple driver instances. Fixes #34.
Allow the same pin instance to be passed into multiple driver instances. Fixes #34.
Previously, you could run two SPI displays (I was able to run two 240x240 round displays) at the same time, so long that the CS and BL pins were different.
For reference, this was discussed on the forums and this is where I was able to implement it from: https://forums.pimoroni.com/t/two-1-3-spi-colour-lcd-240x240-on-one-pi/16737/8
Now, when attempting to run the
gif.py
orimage.py
example with a minor addition to initialize a copy ofdisp
asdisp2
with the CS and BL pins changed, I get the following error message:It appears that the latest version no longer releases the DC pin after use and therefore the second display cannot be initialized.
Steps:
st7789.__version__
: 1.0.1The text was updated successfully, but these errors were encountered: