larics / sds011-reader

Read data from the SDS011 PM sensor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SDS011 PM sensor reader

Read data from the SDS011 PM sensor in active reporting mode.

Dependencies

PIP: sudo apt install python3-pip

python -m pip install pyserial

Setup

Use uart rules to create a persistent name for your device. Write the following line into a .rules file. For example /etc/udev/rules.d/50-local.rules

SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="ttyUSB_SDS011_PM_sensor"

Usage

Run the read_sensor.py script with python3. It will create a <today's_date>.csv file and populate it with measurements.

$ python3 read_sensor.py

About

Read data from the SDS011 PM sensor


Languages

Language:Python 60.5%Language:CMake 39.5%