ikalchev
py-sds011
Python

Python 3 interface to the SDS011 air particulate density sensor.

Last updated Jan 22, 2025
80
Stars
28
Forks
9
Issues
0
Stars/day
Attention Score
11
Language breakdown
Python 100.0%
โ–ธ Files click to expand
README

py-sds011

This is a python 3 interface to the SDS011 air particulate density sensor. The datasheet, which this implementation follows, can be found here.

Depends on pyserial.

API

>>> sensor = SDS011("/dev/ttyUSB0", usequerymode=True) >>> sensor.query()  # Gets (pm25, pm10) (15.6, 20.3) >>> sensor.sleep()  # Turn off fan and diode >>> sensor.sleep(sleep=False)  # Turn on fan and diode >>> time.sleep(15)  # Allow time for the sensor to measure properly >>> sensor.query() (16.2, 21.0) >>> # There are other methods to configure the device, go check them out.

ยฉ 2026 GitRepoTrend ยท ikalchev/py-sds011 ยท Updated daily from GitHub