Sensirion_SPS30

Python script to read multiple fine particles (PM1 to PM10) from Sensirion SPS30. The script can work with multiple devices connected to USB hub

View on GitHub

Sensirion_SPS30

Python script to read multiple fine particles (PM1 to PM10) from Sensirion SPS30. The script can work with multiple devices connected to USB hub

Set up

Run


- data is logged into CSV file by default, to only read the CSV on terminal then set `save_data=False` like this:

s1 = SPS30(port=’/dev/ttyUSB0’, save_data=False)

- in addition, if you want to push data to MQTT server, than config the details:

MQTT host, users

mqtt = ‘192.168.1.100’ # change this topic = ‘sensor/sps30’ # and this auth = {‘username’: ‘mqtt_user’, ‘password’: ‘mqtt_password’} # and these two

- and specify the this option:

p = SPS30(port=port, push_mqtt=False) ```

Data analysis

Credit

The core of Python Inteface with SPS30 was forked from feyzikesim