-
Notifications
You must be signed in to change notification settings - Fork 73
Add support for lgpio #144
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have access to a Pi 5, so maybe someone else can give this code a try to confirm it to be working?
There's also a lot of duplication between lgpio and gpio that could be abstracted away using a shared base class. But in practice it's probably fine as-is.
docs/api.rst
Outdated
CharLCD (lgpio) | ||
=============== | ||
|
||
The main class for controlling GPIO (parallel) connected LCDs on Raspberry Pi 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be 5+, right? (Assuming that the GPIO won't change again in the next version.)
The main class for controlling GPIO (parallel) connected LCDs on Raspberry Pi 5 | |
The main class for controlling GPIO (parallel) connected LCDs on Raspberry Pi 5+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does adding or newer
sound? e.g. The main class for controlling GPIO (parallel) connected LCDs on Raspberry Pi 5 or newer
. 5+ to me almost sounds like a model number. I'm fine with 5+, but I'd rather be as clear as possible
docs/getting_started.rst
Outdated
<https://learn.adafruit.com/character-lcds/wiring-a-character-lcd>`_ to learn | ||
how to wire up these circuits. | ||
|
||
Note that if you are using a Raspberry Pi 5, you'll need to use this import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again:
Note that if you are using a Raspberry Pi 5, you'll need to use this import | |
Note that if you are using a Raspberry Pi 5+, you'll need to use this import |
Also in a few other locations below.
Just got back home from vacation - thanks for the notes. I'll address them on Monday |
I could certainly do this for you if you'd like. Would you rather this be a separate pull request or leave it in here? |
Unfortunately,
RPi.GPIO
doesn't work on Raspberry Pi 5 as discussed by this forum post. This pull request helps to resolve this by adding support forlgpio
, an easy-to-translate replacement forRPi.GPIO
. The new file,lgpio.py
, is based on thegpio.py
file with some modifications to accommodate the new library. Additionally, documentation is updated to acknowledge the new file.I've tested this on my own Raspberry Pi 5 with a 16x2 LCD and it Works On My Machine™