Open g7uvw opened 11 months ago
You can install a specific version of the library with:
pip install pms5003==0.0.5
Which will retrieve the version before the migration to gpiod/gpiodevice.
An error like PIN15 not found
means your Pi probably names it GPIO22
since PIN15
is the name of GPIO22
on a Pi 5-
Yup. Pin names as provided by gpiod/gpiochip devices are not consistent across Raspberry Pi devices. 😭
I had an Enviro+ running for a year on a Pi ZeroW before I decided to upgrade the OS to latest, and completely broke the operation of the Enviro+.
I did a fresh install of the previous OS version and have almost everything running again except the PMS5003. Pulling down the latest driver from here an running examples/all.py give the following error
Re-running install.sh did some magic, got rid of the gpiochip error but then lead to the following error:
The solution seems to be
pip install RPi.GPIO
replace
/usr/local/lib/python3.9/dist-packages/pms5003/__init__.py
with the one from this commit https://raw.githubusercontent.com/pimoroni/pms5003-python/406801133aaa7489dd4b967890c1cab7a656a4aa/library/pms5003/__init__.pyAfter that the examples work perfectly.