I just setup a new Raspberry Pi Zero with an Enviro+ and had the issues above and this fixed it for me. Thanks
In all cases, knowing the output of /proc/device-tree/model
and gpioinfo
(might need to sudo apt install gpiod
) would be useful for adding explicit support for older Piās.
I wonder if adding a row simply for Raspberry Pi
copying the Pi 4 pins would work across all previous boards. Iāve raised the pin-names-being-different-between-boards issue upstream with Pi and thereās still some uncertainty about how to deal with that.
Sorry for throwing a curveball here. The switch to libgpio has beenā¦ dicy. Trying to get it done right and trying to get it done fast are mutually exclusive. I had to take some time off over Christmas, but Iām getting back on this now.
(was tipped off about this thread by a comment on Port to gpiod and gpiodevice Ā· pimoroni/pms5003-python@77d1e34 Ā· GitHub - thanks)
In all cases, GitHub is the best way to raise any issues, input, comments or join me in screaming into the void, currently there are a few relevant places for this tumultuous transition-
- the individual device drivers (like
PMS5003
) have repositories with a slew of gpiodevice/libgpiod related issues - Issues Ā· pimoroni/pms5003-python Ā· GitHub - gpiodevice is the Python library I concocted to try and smooth over the cracks with libgpio, though itās not always obvious where itās at fault rather than an individual library - Issues Ā· pimoroni/gpiodevice-python Ā· GitHub
- on the Python boilerplate thereās an open PR detailing the Pep668 (Virtual Environment) change and what Iām trying to do about it - https://github.com/pimoroni/boilerplate-python/pull/13
- thereās also an open issue documenting my rampage through our libraries and what I need to change for Pi 5/Bookworm compatibility and more long-term compatibility - Migration to Pi 5 / Bookworm Progress Ā· Issue #16 Ā· pimoroni/boilerplate-python Ā· GitHub
Hey all,
Like suggested here in this topic, I uninstalled newer versions of pms5003 and st7735 and installed specified versions but Iām getting this error:
2024-04-08 22:33:00.458 WARNING Main Loop Exception: PMS5003 Read Timeout: Failed to read start of frame byte
this line keeps appearing over and over and the lcd screen shows colorful grainy, noisy pattern. Using Zero W with Debian Bullseye (2024-03-12). Also tried it with Zero 2W and the result was the same.
I also tried sebgusā way of modifying init.py in pms003 package but that method showed me another error on Zero.
Any progress on the fixes?
Withot a working software, this module is just paperweight.
I think Pimoroni requires this disclaimer on their product page: āThe software package we put together doesnāt work anymore due to some changes in libraries and users required find a solution on their ownā.
Because currently, under software headline, the wording create the illusion of a easy to setup & plug and play environment created by you, which is not true and is deceptive.
Sorry to hear youāre still struggling!
Have you tried starting from fresh with a new image of Pi OS Bookworm and a fresh pull of the library? Weāve now merged in all the updates to accommodate the new GPIO libraries and updated our Learn guide so things should hopefully now be in a less confusing state than they were back in April.
If youāre still having problems getting things working please let us know the exact text of the errors that youāre getting and weāll see if we can help further.
Hi,
Yes, I noticed everything started to work just fine out of the boxā¦until today. Today when I did a fresh install with my Zero 2W and 64bit Raspberry Pi OS Lite (bookworm) and tried to run one of the examples, I get this:
(pimoroni) cagan@enviro:~/enviroplus-python/examples $ sudo python all-in-one-no-pm.py
Traceback (most recent call last):
File "/home/cagan/enviroplus-python/examples/all-in-one-no-pm.py", line 8, in <module>
import st7735
ModuleNotFoundError: No module named 'st7735'
In fact, no matter which example I run, I always see an error about a library cannot be found:
(pimoroni) cagan@enviro:~/enviroplus-python/examples $ sudo python gas.py
Traceback (most recent call last):
File "/home/cagan/enviroplus-python/examples/gas.py", line 6, in <module>
from enviroplus import gas
ModuleNotFoundError: No module named 'enviroplus'
What could be causing it?
If you run the examples with sudo
it probably wonāt pick up the right virtual environment - run them without sudo
(as per the Learn article) and they should be fine.