Open davetisyan95 opened 1 year ago
I can confirm that a fresh setup with the sensor on a new Raspberry Pi Zero with Enviro+, will not work as instructed. I also had this setup working in 2021.
Me too. Pick-up my EnviroPlus board with a RPI Zero.
I get this error:
python3 particulates.py
2023-11-27 14:41:35.527 INFO particulates.py - Print readings from the PMS5003 particulate sensor.
Press Ctrl+C to exit!
Traceback (most recent call last):
File "/home/pi/enviroplus-python/examples/particulates.py", line 18, in <module>
pms5003 = PMS5003()
^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pms5003/__init__.py", line 109, in __init__
self._pin_enable, self._pin_reset = gpiodevice.get_pins_for_platform(PLATFORMS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 0)
Sadly I can +1 the problem with a fresh setup and the PMS5003 sensor. Everything else is working fine.
Traceback (most recent call last):
File "/home/pi/Pimoroni/enviroplus/examples/mqtt-all.py", line 278, in <module>
main()
File "/home/pi/Pimoroni/enviroplus/examples/mqtt-all.py", line 243, in main
pms5003 = PMS5003()
File "/usr/local/lib/python3.9/dist-packages/pms5003/__init__.py", line 109, in __init__
self._pin_enable, self._pin_reset = gpiodevice.get_pins_for_platform(PLATFORMS)
ValueError: not enough values to unpack (expected 2, got 0)
Recent errors - eg: ValueError: not enough values to unpack (expected 2, got 0)
- appear to be related to the migration to gpiod/Bookworm OS. Some more details and tips for how to debug what's happening are available here: https://github.com/pimoroni/enviroplus-python/pull/126
A workaround would be installing the last working version via pip install pms5003==0.0.5
this worked for me.
In the mean time pimoroni should try not setting the version to 1.0 if things break so regularly on the examples.
Hello,
I am encountering an error when running the
particulates.py
example.Things I have tried:
install.sh
and verified/boot/config.txt
check-install.py
looks okAll other scripts work fine, it is just when trying to use the PM sensor in
particulates.py
.Context: I have successfully run this before maybe around 2021? I have since lost that version of the code and recently tried re-using it. Initially i was using the latest OS (Bullseye), now am on Buster and still no luck.