Skip to content

Python 3 interface to the SDS011 air particulate density sensor.

License

Notifications You must be signed in to change notification settings

ikalchev/py-sds011

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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", use_query_mode=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.

About

Python 3 interface to the SDS011 air particulate density sensor.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages