# PMS5003 - Enabling to Enviro+

**URL:** <https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596>\
**Category:** Support\
**Created:** [January 1, 2020, 12:17pm UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596 "2020-01-01T12:17:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnneC](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/annec/32/5937_2.png) [@AnneC](https://forums.pimoroni.com/u/AnneC)\
**Post date:** [January 1, 2020, 12:17pm UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/1 "2020-01-01T12:17:24Z")

</div>

Hi, I need an idiot’s guide in plain English pls. I’m using an Enviro+ and a Pi Zero WH (with Raspbian Buster updated and upgraded) and have got the Enviro+ working perfectly with the python examples. Now I want to use the PMS5003 particulate matter box with it. I’ve got it connected up but when I tried to do the raspi-config to enable the connection I haven’t had any success. Do some versions of Raspbian need sudo and others not? I managed to enable i2c and SPI from the ‘Preferences’ menu but as for the other bits which need doing in the LX Terminal I seem stuck. I think it’s because I don’t understand the commands. Also, I’ve seen 2 slightly different sets of commands for enabling this UART connector. Can you explain what I need to do very precisely please.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 1, 2020, 12:38pm UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/2 "2020-01-01T12:38:14Z")

</div>

There are two different config menus which can be confusing.  
running `sudo raspi-config` from terminal or command line gets you the older original.  
I “think” its Interfacing options \> SPI enable?  
From the desktop its Preferences \> Raspberry Pi Configuration \> Interfaces.  
I “think” its SPI you turn on?

Post a link to the guide(s) your following and I may be able to offer some better info.  
I have also noticed, if I do a startx from the terminal to get the desktop gui, I get some weird errors when I try to do things. I usually go into raspi-config and toggle it to boot to the GUI and reboot.

---

<div class="post-metadata">

**Author:** ![AnneC](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/annec/32/5937_2.png) [@AnneC](https://forums.pimoroni.com/u/AnneC)\
**Post date:** [January 1, 2020, 12:50pm UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/3 "2020-01-01T12:50:32Z")

</div>

Thx @alphanumeric . I’ll get back to you when I’m home.

---

<div class="post-metadata">

**Author:** ![AnneC](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/annec/32/5937_2.png) [@AnneC](https://forums.pimoroni.com/u/AnneC)\
**Post date:** [January 1, 2020, 3:59pm UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/4 "2020-01-01T15:59:59Z")

</div>

On this page: [https://shop.pimoroni.com/products/pms5003-particulate-matter-sensor-with-cable](https://shop.pimoroni.com/products/pms5003-particulate-matter-sensor-with-cable)  
it says: **Note** that if you’re using this sensor with Raspberry Pi, then you’ll need to make a couple of changes to its configuration. Type `sudo raspi-config` in the terminal and then under “Interfacing options” and “Serial” **disable the login shell** and **enable the serial port hardware**. Edit your `/boot/config.txt` file and add the lines `enable_uart=1` and `dtoverlay=pi3-miniuart-bt` to the bottom of the file.

On this page in github: [https://github.com/pimoroni/enviroplus-python/](https://github.com/pimoroni/enviroplus-python/)  
It says:  
And if you’re using a PMS5003 sensor you will need to:

- 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-bt` to your `/boot/config.txt`

And install additional dependencies:

```auto
sudo apt install python-numpy python-smbus python-pil python-setuptools

```

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 1, 2020, 8:13pm UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/5 "2020-01-01T20:13:26Z")

</div>

Ok, that first link is as near as I can tell for using the PMS5003 on a Raspberry Pi by itself, no Enviro+ between it and the Pi.  
And the second link is the manual install instructions for the Enviro+ and the PMS5003 if you have one.

You should be able to set it “all” up by running  
` curl -sSL https://get.pimoroni.com/enviroplus | bash`  
It states on the PMS5003 product page “Our Enviro plus installation script will do all of this configuration for you”.

---

<div class="post-metadata">

**Author:** ![AnneC](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/annec/32/5937_2.png) [@AnneC](https://forums.pimoroni.com/u/AnneC)\
**Post date:** [January 2, 2020, 11:15am UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/6 "2020-01-02T11:15:46Z")

</div>

Thank you @alphanumeric . I was being cautious because I don’t want to run it headless yet and I thought this command might do that as well. I guess this only does the set-up and not the headless bit.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 2, 2020, 12:44pm UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/7 "2020-01-02T12:44:24Z")

</div>

Headless just means running without a monitor keyboard and mouse attached. The Pi will still boot up with no monitor etc connected. You will have to set it to run your python file automatically on boot up.  
I use crontab for that. From the terminal run  
`sudo crontab -e`  
then add  
`@reboot python3 /home/pi/yourfile.py &`  
Ctrl x, y, enter to save it.  
/home/pi is where my file is located, change that to the path to where your file is located.  
And substitute the name of your file for yourfile  
The only extra bits you may need to do is configure it for remote connection via Putty etc. If you want to connect from another device over your network. I can’t remeber if thats enabled by default in Raspbian or not?  
If you have installed Buster with Desktop, you can go into Raspberry Pi Configuration and set it to boot to command line instead of the Desktop GUI. It will save some resources that way.

---

<div class="post-metadata">

**Author:** ![AnneC](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/annec/32/5937_2.png) [@AnneC](https://forums.pimoroni.com/u/AnneC)\
**Post date:** [January 2, 2020, 4:21pm UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/8 "2020-01-02T16:21:49Z")

</div>

Hi alphanumeric, Yes, I’ve done some headless projects before: a _scrolling badge on a pi zero_ and a _bag with LEDs on the front with a pi zero_ so I’m okay with that - but thanks for telling me what you use, to run a project headless, as there seem to be a few different methods.  
I ran the **curl** that you said, I should use, previously and got an error msg in red, "Apt failed to update ‘indexes’. " Is it likely it’s going to work anyway or do I need to try again? Grandchildren came so I’ve not had time to try.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 2, 2020, 5:55pm UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/9 "2020-01-02T17:55:52Z")

</div>

I’ve had the same thing happen now and then with the one line installer. When that happens I go to the second method. In your case that would be as follows.

- `git clone https://github.com/pimoroni/enviroplus-python`
- `cd enviroplus-python`
- `sudo ./install.sh`

You could wait and see if everything works before doing this though. Doing it won’t (shouldn’t) hurt anything you’ve done so far. I’ve done one after the other and it fixed the python etc errors I was getting.

---

<div class="post-metadata">

**Author:** ![AnneC](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/annec/32/5937_2.png) [@AnneC](https://forums.pimoroni.com/u/AnneC)\
**Post date:** [January 3, 2020, 8:54am UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/10 "2020-01-03T08:54:00Z")

</div>

Thanks alphanumeric. I’ll try my set-up with the all-in-one installer, that I’ve done already, first and see what works - then I’ll use the ‘separate commands’ method later, if necessary.

---

<div class="post-metadata">

**Author:** ![AnneC](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/annec/32/5937_2.png) [@AnneC](https://forums.pimoroni.com/u/AnneC)\
**Post date:** [January 3, 2020, 10:09am UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/11 "2020-01-03T10:09:00Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/c/c2391fc22736ad59f64d6b46724e1be92b9afa5e.jpeg)

Thx@alphanumeric,

Everything working having used the one-line installer and not taken any notice of the error msg. I’ve learnt so much, from you, doing this so thanks again for your help!

Now to learn what the data all means so I can really understand air quality.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 3, 2020, 10:39am UTC](https://forums.pimoroni.com/t/pms5003-enabling-to-enviro/12596/12 "2020-01-03T10:39:49Z")

</div>

Thats good to hear, glad to help,enjoy your new tech. =)
