Note The code in this repository supports both the Enviro+ and Enviro Mini boards. The Enviro Mini board does not have the Gas sensor or the breakout for the PM sensor.
git clone https://github.com/pimoroni/pms5003-pythoncd pms5003-python./install.sh
Note Libraries will be installed in the "pimoroni" virtual environment, you will need to activate it to run examples:
source ~/.virtualenvs/pimoroni/bin/activate
Note Raspbian/Raspberry Pi OS Lite users may first need to install git: sudo apt install git
python3 -m venv --system-site-packages $HOME/.virtualenvs/pimoroni- Run
python3 -m pip install pms5003
Note this will not perform any of the required configuration changes on your Pi, you may additionally need to:
- Enable serial:
raspi-config nonint do_serial_hw 0 - Disable serial terminal:
raspi-config nonint do_serial_cons 1 - Add
dtoverlay=pi3-miniuart-btto your/boot/config.txt
- Enable serial:
raspi-config nonint set_config_var enable_uart 1 /boot/config.txt - Disable serial terminal:
sudo raspi-config nonint do_serial 1 - Add
dtoverlay=pi3-miniuart-btto your/boot/config.txt
In both cases the last line will switch Bluetooth over to miniUART, see https://www.raspberrypi.org/documentation/configuration/uart.md for more details.

