Enviro+ instructions/examples need updating?

Howdy,

I suspect one of the Pimoroni pages/instructions needs an update (last 2019). Having followed these instructions carefully: Getting Started with Enviro+ I am unable to get examples like all-in-one.py running.

Specifically, I get:

“Traceback (most recent call last):
File “/home/[myname]/enviroplus-python/examples/./all-in-one.py”, line 38, in
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)”

Any ideas what happened? I’m sort of expecting something got an update, but that’s a guess. Cheers!

Scott

Hello? Pimoroni? Buehler? Anyone?

Hi!

What Pi and what Pi OS version are you using? If you’re using the newest version (Bookworm) you’ll need to be using this updated installer - Repackage to latest boilerplate, Pi 5 + Bookworm compatibility by Gadgetoid · Pull Request #126 · pimoroni/enviroplus-python · GitHub . It’s a work in progress, so if you run into any issues with it it would be great if you could let the software folks know on Github.

Howdy,

Yes- I was using the current (Bookworm version). Would using Bullseye be an easier path?

Cheers,

Scott

Well… having just reimaged with Bullseye (64 bit) I get the same exact error message. I guess that’s not the easier path. :(

Also no help using the 32 bit version of Bullseye.

I’ve had great problems with this disasterous excuse for a library too.

I’ve managed to get these working so far…
BME280 temperature, pressure, humidity sensor
LTR-559 light and proximity sensor
ST7735 0.96" colour LCD

Basically what you need to do on Bookworm is install a virtual environment using…
sudo apt-get install python-full python3-numpy python3-smbus python3-pil python3-cffi python3-spidev python3-rpi.gpio (extras bits for Python - not sure which are rqd)
python -m venv [somedir] (only need to do this once)
then
source [somedir]/bin/activate (when you want to use Python)

This will set you up a Virtual Python Environment (which the installer screws up at) with it’s own pip (empty)

Now you can install the python packages via…

pip install pimoroni-bme280 pms5003 ltr559 st7735 ads1015 pimoroni-mics6814 fonts font-roboto astral pytz sounddevice paho-mqtt pillow
[this is an incomplete list - still working the deps out]

Now go to Pimoroni Ltd · GitHub and git clone the repos for the chips - eg find bme280, st7735 ltr559 etc (these ones I’ve got working)

These specific examples definitely work - I didn’t bother with the £25 PMS add-on sensor so dunno if that works or not. Many (33%) examples are written with it in mind - shoddy upsell attempt?

The ones I’ve not got working yet are …
MEMS microphone
ADS1015 analog to digital converter (ADC)
MICS6814 analog gas sensor

The Microphone is particularly annoying as it says

MEMS MICROPHONE

Enviro+ has a tiny MEMS microphone that lets you record audio or detect noise levels. It’s really good for monitoring levels of noise pollution, and we’ll be adding support for this to our Enviro+ Python library soon.

It looks like it’s said that since June 14, 2019 (and Wayback Machine has that text in a version from Sept 28th 2021 - PiMoroni have edited it in between 2019 + 2021?)

Half of it works - maybe we should all ask for half our money back?

So far… (Clock + Temp - which is what I wanted most)
ENVIRO
Pi5 Bookworm

How it got 8/10 in MagPi 83 - July 2019 I fail to see (probably worked back then) - today it’s a 4/10 at most. I guess the Enviro+ is the Raspberry equivalent of running Windows 8 in 2024…

2 Likes