-
Notifications
You must be signed in to change notification settings - Fork 103
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
Bookworm/Pi5 Compatibility: Upgrade to latest boilerplate #102
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 9351867446Details
💛 - Coveralls |
Tested so far on a Pi 4 running Bullseye and a Pi 5 running Bookworm.
Okay looks like on Ubuntu Pi 4 (and probably 5)
|
Avoid a segfault on exit as detailed in pimoroni/gpiodevice-python#1
Fix a bug where auto_venv.sh was being created in a non-existent directory. Trap exit codes for some commands and add some help text + GitHUb url at the end of the install process. Try to comment what some sections do, and insert linebreaks so they are more logically broken up in the installer output. Try to be more consistent with colours. Try to be more friendly with colours- remove full red warning text in favour of a prefix so the errors/warnings are easier to read. Return a failure exit code if bits of the script have failed. Try to re-order output so it's more logical. Re-word venv creation message.
2f171f5
to
7c3284a
Compare
Hi, Short question about compatibility of the There seem to be some intermediate fixes, e.g. dropping in the Thanks in advance! |
It should work. I even went so far as to test Blinkt! on not-a-Pi devices which have never supported RPi.GPIO. Some of the finer points of finding the right GPIO interface and lines remain an open question, so I'd be very interested in your feedback if you get a chance to try this library. |
Hi thank you for your quick reply! And sorry for getting back so late on this.
We didn't investigate this any further, as replacing the |
Testing
If you're a Bookworm / Pi 5 user running into virtual environment issues, you can try this library like so:
The
./install.sh
script will create apimoroni
virtual environment that's shared between our products. (or use your existing venv if you've already activated one.)For the reasons behind these changes and other information, see:
Troubleshooting
OSError: Device or resource busy
If you see an error like this:
You should install
sudo apt install gpiod
and rungpioinfo
to see what's using your pins. There should be a name in the column of "unused" things. If it's something like "sysfs" then something like RPi.GPIO (on an older Pi 4 OS) has already claimed the pin via/sys/class/gpio
and gpiod will not let you use it.Or, as of recent changes, a more useful error like this:
Then make sure you close whatever process, or disable whatever service is implicated as the claimant 😆
PermissionError: Permission denied
If you see an error like this:
You may need to add yourself to the "dialout" group, or whatever group arbitrates GPIO access on your distro. For example on Raspberry Pi Ubuntu -