-
Notifications
You must be signed in to change notification settings - Fork 43
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
Raspberry Pi5 #43
Comments
Work in progress is here - #36 I can't use The downside of My work in progress code tries to do PWM in Python, something we currently need to do since the pins used to PWM Grow's pumps are not hardware PWM capable. I'm currently down a rabbit hole of trying to figure out how best to nudge about this proposal- https://lore.kernel.org/all/[email protected]/ |
@Gadgetoid would it make sense to do the following:
I know this means a period of compromised functionality for Pi5 users, but this is better than it just point blank failing with cryptic message, we can just print out a message that it's upcoming. It also avoids people hacking on the code using the old library |
I think he's knee deep in getting gpio going across the board. Now a short/long term option is to use gpiozero*, it's stable W.R.T the way a user puts it together. Pi4 and before can use pigpio/RPi.GPIO as they wish, Pi5 can use lgpio for now until some other pin library is made and can be bolted into the back end. Honestly I'm leaving @Gadgetoid to curse and create. Hoping RPi don't drop a new RPxxxx out of the door. But you're then relying on RPi to keep at it with gpiozero* and some of them don't work for RPi anymore. |
The trouble with gpiozero is that it's just a wrapper for existing IO libraries. So under the hood on Pi 5 it uses LG/LGPIO, which has no installation candidate on Pypi, and thus cannot be installed into virtual environments without enabling system-site-packages and rendering the whole virtual environment completely redundant... please hold for a moment while I scream into a pillow... Okay... @tomjn that's a sensible idea and should unblock me in the near term. My efforts to nudge about the generic PWM driver on the linux-pwm mailing list have so far run into "I have no idea what I'm doing" territory. Soft PWM in Python on the Pi 5 isn't terrible... at least until it gets interrupted by another process, or crashes- it seems some people like the Pi to retain pin state when an application bails, which is... unwise. |
I get you with gpiozero, it was just general compatibility, of course with
its own restrictions.
The python part of lgpio is on pypi? Sure I noticed it there.
Joans https://pypi.org/project/lgpio/
I've been reading that pin talk for libgpiod(2)
As a side and the throw yet another thing into the expanding ring, I
believe waveform80 has created an RPi.GPIO compatible layer that can be
used on a Pi5, it need the PI4 removing and the new one with a different
name installing.
Mentioned buried in the Pi forum somewhere.
Hang on
https://rpi-lgpio.readthedocs.io/en/release-0.4/index.html
But I am getting confused now between all the gpio sounding modules and
libraries.
…On Tue, 23 Jan 2024, 12:33 pm Philip Howard, ***@***.***> wrote:
The trouble with gpiozero is that it's just a wrapper for existing IO
libraries. So under the hood on Pi 5 it uses LG/LGPIO, which has no
installation candidate on Pypi, and thus cannot be installed into virtual
environments without enabling system-site-packages and rendering the whole
virtual environment completely redundant... please hold for a moment while
I scream into a pillow...
Okay...
@tomjn <https://github.com/tomjn> that's a sensible idea and should
unblock me in the near term. My efforts to nudge about the generic PWM
driver on the linux-pwm mailing list have so far run into "I have no idea
what I'm doing" territory. Soft PWM in Python on the Pi 5 isn't *terrible*...
at least until it gets interrupted by another process, or crashes- it seems
some people like the Pi to retain pin state when an application bails,
which is... unwise.
—
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACYAXN4CHLWFPDTB5S45B53YP6UYLAVCNFSM6AAAAABBYBKUROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBVHE3DKMZUGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hey, any updates on Bookworm/Pi5 compatability? |
Despite the apparent lack of progress, I've been slowly poking behind the scenes so not one, but two reliable ways to achieve PWM on the Pi 5 are continuing to work their way through the pipeline. Linux PWM still somewhat has the wart that it'll continue rampaging on if your program crashes- this was one of the things the GPIO Character Device ABI fixed with its "claim pins" workflow. I think the You'd need to create a virtualenv (https://pimoroni.github.io/venv-python/) and:
Then clone this repo and try to run the examples directly. |
I think the issue was there wasn't a module to install with pip until RPi eventually got involved. Probably. |
IIRC all the releases that are there now were there when I ran into the problem, so I poked some people so Ben and Dave were added as maintainers (neither work for RPi though they do RPi adjacent stuff) and now it works? Maybe they yanked and re-issued a release or I've just forgotten what the most recent release was in the intervening months. Weird! I should probably give it a more thorough test tomorrow, since it's a perfectly fine stand-in while I continue to grapple with Linux PWM. |
Hey, I finally got around to trying it, and can confirm that the grow hat works on the RPi5! |
In a startup script you should just be able to replace
|
Thanks. Do you know where I can find the startup script?
My assumption is to change ExecStart, but I currently I can't figure out how... |
So, I know it's not going to work, but is there any development toward getting it working on the Pi5 (yes absolute overkill) and PiOS Bookworm, I can see some talk but not sure which branch you are using for it.
Personally, I'll be creating a venv in /opt as I have another python daemon/service working from there under venv's, so just git pulling to do it, creating a venv, hopefully just using requirements for all the pip modules to come down and then that keeps it well away from my other python stuff. (the point of venv's and the main reason for the change by Debian/Python)
import RPi.GPIO as GPIO obviously the biggest killer.
So lgpio/gpiozero ?
/opt may well go to Home, depending on which is easier.
The text was updated successfully, but these errors were encountered: