SDS011 Library
Project description
sds011lib
sds011lib
is a fully-typed, nearly-complete, python 3.8+ library for interacting with the SDS011 Air Quality Sensor.
The SDS011 is a small, low-cost sensor created by www.inovafitness.com, used to measure particulate matter in the air. It can measure both PM 2.5 and PM10 values simultaneously, and connects to devices over a serial port, or via USB with an included adaptor.
The full documentation is available at https://timorme.github.io/sds011lib/
Installation
pip install sds011lib
Quickstart
from sds011lib import SDS011QueryReader
from serial import Serial
# Setup a query-mode reader on /dev/ttyUSB0
sensor = SDS011QueryReader('/dev/ttyUSB0')
# Read some data!
aqi = sensor.query()
print(aqi.pm25)
print(aqi.pm10)
# Put the device to sleep
sensor.sleep()
# Wake it back up
sensor.wake()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sds011lib-0.3.1.tar.gz
(9.2 kB
view hashes)
Built Distribution
sds011lib-0.3.1-py3-none-any.whl
(10.0 kB
view hashes)
Close
Hashes for sds011lib-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a30fdb5a8556381ecfd8613c1627db83c39fd79cbc9101d6a8598967d1270dd |
|
MD5 | e1528c89636cf1450a50bdc08a637d5b |
|
BLAKE2b-256 | 11dbdf4c4c9c9c8c0a0512ec2e3afc807600d0850181f1d5e58a92d1b3a91c8c |