Skip to content

Instantly share code, notes, and snippets.

View jakubczaplicki's full-sized avatar

Jakub Czaplicki jakubczaplicki

View GitHub Profile
@jakubczaplicki
jakubczaplicki / sds011
Created February 22, 2017 20:35 — forked from kadamski/sds011
SDS011 dust sensor reading
#!/usr/bin/python
# coding=utf-8
# "DATASHEET": http://cl.ly/ekot
from __future__ import print_function
import serial, struct, sys, time
DEBUG = 1
CMD_MODE = 2
CMD_QUERY_DATA = 4
CMD_DEVICE_ID = 5