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.shNote 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/pimoronipython3 -m pip install pms5003Note this will not perform any of the required configuration changes on your Pi, you may additionally need to:
raspi-config nonint do_serial_hw 0raspi-config nonint do_serial_cons 1dtoverlay=pi3-miniuart-bt to your /boot/config.txtraspi-config nonint set_config_var enable_uart 1 /boot/config.txtsudo raspi-config nonint do_serial 1dtoverlay=pi3-miniuart-bt to your /boot/config.txtIn both cases the last line will switch Bluetooth over to miniUART, see https://www.raspberrypi.org/documentation/configuration/uart.md for more details.