Repackage to pyproject/hatch and port to gpiod #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR upgrades the packaging to our latest boilerplate and ports additional pins to gpiod/gpiodevice. Part of an effort to bring enviro up to speed with Raspberry Pi 5 - pimoroni/enviroplus-python#126
Note: This library uses SPI and requires this patch - raspberrypi/linux@686fe77 - to function without raising a TimeoutError on Pi 5.
Pi 5 / Raspberry Pi OS
Make sure your user is in the group
spi
and enable SPI withdtparam=spi=on
or viaraspi-config
Rock 5B / Armbian
On ROCK5B and possibly other modern platforms, it needs a custom dtoverlay to remove control of MISO from the spi driver, otherwise the data/command pin cannot be asserted by gpiod.
In
/etc/udev/rules.d/60-spidev.rules
:Then:
Make sure your user is in the
gpio
group:Create a new file
rk3588-spi0-m2-cs1-nomiso-spidev.dts
with the dts code below.Install with:
sudo armbian-add-overlay rk3588-spi0-m2-cs1-nomiso-spidev.dts