-
Notifications
You must be signed in to change notification settings - Fork 122
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
Port to gpiod for Bookworm/Pi 5 and beyond #182
Conversation
Copied from #169 Co-authored-by: Phil Howard <[email protected]>
* Fix VENV_DIR path. * Fix auto_venv.sh creation. * install.sh: normalise whitespace. * install.sh: rework for better error reporting and fix some bugs. * README.md: Correct coveralls badge branch. * CI: Update GitHub Actions versions. * QA: Add shellcheck and fix/ignore all issues. * install.sh: slightly better feedback for setup commands. * install.sh: fix quoting bug in do_config_backup. * install.sh: don't output printf commands.
2a17604
to
0b50f4c
Compare
GPIO setup tests have been pruned and could use rewriting. PIL is now always assumed to be installed.
@Gadgetoid here's the output:
Checking the back of the board, there's no EEPROM. I've been using I've also got an old school yellow PHAT that works as expected, so that's cool. |
Tried |
@Gadgetoid Ok, interesting. I created an instance of
That's all good, until it hits the new canvas. It looks like To confirm that was the issue, I swapped
I haven't looked into whether this change breaks things on my pHAT or not yet. Frankly, it's a little weird to me that it's working anywhere. |
Looks like I updated this code as part of this branch, but it's as of yet untested. I would expect it to break the pHAT if it was using the same driver. It may be that the cols/rows values for the displays need updating and the code tweaked to use them properly. Very much something I need to write a test for! |
Yeah, you might not really need cols/rows at all (except maybe for backward compatibility with early versions). It looks like they're just the same values as the width and height for all displays? |
Assuming the test tests what I think it does - I'm pretty rusty on these old Inky boards - then just removing the additional canvas and image pasting step seems to work. Afaik this step does nothing at best, since the image is already resized to the display width/height. Raised the new test and possible fix and a PR against this branch here: #188 |
It isn't. Here's the identify for my board:
When I run the logo example following the above installation instructions, I get:
My Inky shows the same display as in the comment by @stonehippo (although mine is yellow). |
Yeah, they changed that recently-ish just to keep me on my toes 😢 In that case, what's in your |
@Gadgetoid Here you go!
|
Looks like I need a try/catch around the chip select disable call- since it isn’t owned by the SPI driver 😬 |
Oh hmm, wait, this warning is the result of such a try/catch. Sorry I have completely lost the plot from juggling so much stuff that my memory was purged of any and all recollection of this issue. More discussion and a potential fix should be detailed here. I'll get some install instructions added for the fix branch so it's easier for you to try - #188 |
Hello, I tried installing this branch with the given instructions on the Pi 5, but I get the below error. Any ideas?
|
aaand it looks like this fixes it... |
The image is resized to the display width/height, what was this even for?
Hey ho, we're in the process of transitioning the Inky library and examples to gpiod, virtual environments and the shiny new Pi 5.
As such, I'd really like your feedback!
Progress
Note: Most examples using GPIO have not been ported, with the exception of
examples/7color/buttons.py
.Note: The simulator might be broken. I am removing conditional imports and custom
ImportError
trapping where I can, since this overcomplicates the codebase especially when we try to move to gpiod.👉 Installation Instructions 👈
Grab this branch and install with the
--unstable
(local downloaded copy of the library) flag:A venv should be created for you, though this step will be skipped if you're already inside one (in theory).
If you get errors, make sure you activate that virtual environment. Your bash prompt should start with
(pimoroni)
:The installer should have added some new lines to
/boot/firmware/config.txt
so that SPI gets out of the way of the chip-select pin and the EEPROM i2c is enabled (for detecting your Inky board type)-Reboot your Pi, and see if anything breaks.
Things to look out for:
/boot/firmware/config.txt
and that the lines mentioned above are presentMake sure(Note: On my Pi it now seems like this is not a symlink on purpose?)/boot/config.txt
is still a symlink to/boot/firmware/config.txt
- I thinksed
breaks this horribly~/Pimoroni
Inky wHAT (ssd1683)
Tested before the
dtoverlay=spi0-0cs
change, which worked, but this broke SSD1683 because it was using the default SPI chip-select behaviour. I have migrated everything over to use soft chip-select, though it might be worth seeing if we can give it over to the SPI driver on all counts and avoid needing to load that overlay.Inky Impressions 5.7"
I've been having trouble with this, and I'm still suspicious but it seems to now be working-
I have a test board with no EEPROM data, so it blurts out:
This may have been another SPI chip-select issue.
Inky Impressions 4"
My 4" proto has no EEPROM data flashed, so I modified
stripes.py
as follows: