Skip to content
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

Make GPIO/SPI/FTDI optional and switch to rpi-lgpio #284

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

thijstriemstra
Copy link
Collaborator

fixes #270

to install optional dependencies:

  • GPIO : pip install luma.core[gpio]
  • SPI: pip install luma.core[spi]
  • FTDI: pip install luma.core[ftdi]

@thijstriemstra
Copy link
Collaborator Author

thijstriemstra commented Oct 26, 2024

@Pako2 @rm-hull I finally got my hands on a RPI5 and going through the tests to see what breaks and what doesn't and fortunately everything still works when switching to rpi-lgpio, a (supposedly) drop-in replacement for rpi.gpio. I haven't actually tested it with a real display but tests run and pass on an RPI5 for now.

I also started a RPI5 PR for:

Copy link
Owner

@rm-hull rm-hull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@Pako2
Copy link

Pako2 commented Oct 28, 2024

I assume that there are a number of existing users (luma libraries) whose display stopped working after the system upgrade, because the sysfs GPIO interface (and therefore the RPi.GPIO based on it) was no longer supported.
For these users, currently switching to rpi-lgpio (which replaces RPi.GPIO) is probably the only meaningful way to maintain functionality without the need for any complex modifications.
Unfortunately, this only applies to Raspberry Pi SBC users. However, there are also users of SBCs from other manufacturers, such as Allwinner. For those, there was an alternative OPi.GPIO library that was compatible with RPi.GPIO. This allowed luma libraries to be used to control OLED displays. I myself am one of these users and after upgrading LibreELEC/Kodi my display stopped working. For Allwinner (and probably for all other type of SBC) there is nothing like rpi-lgpio. I think there is no point in working on creating something like opi-lgpio. As I suggested earlier in #278, I consider it far more promising to completely skip this intermediate link (RPi.GPIO/rpi-lgpio) and use lgpio directly. This makes much more sense and has one huge advantage: it allows you to work with luma libraries also on SBCs from other manufacturers (for example Allwinner, Amlogic, Rockchip ...). Specifically for Allwinner, I already tried it and it works very well...
So I have a question: does anyone deal with this idea?
Unfortunately, no one responds to my posts in this sense in #278.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RPI.GPIO should be optional
3 participants