DEV Community

loading...
Cover image for Using SDS011 particle sensor from my laptop (python3)

Using SDS011 particle sensor from my laptop (python3)

vvidovic profile image Vedran Vidovic Updated on ・2 min read

Recently we started to check the quality of the air in our town using the IQAir / Air Visual and results were sometimes quite disturbing. That is why we decided to buy an air quality measuring device. Unfortunately, I was not able to find it in any of our local stores so I ordered it from the Amazon.de but we needed to wait for around 1 month (if not more) for this monitor to arrive.

I realized there is SDS011 Air Quality sensor available from our local electronics components store so we went there and bought it the same day.

It seems that I would only need a laptop with the USB port and working Python installation to use it. Of course, it was not 100% straight-forward to use it - instructions were made for usage with the Raspberry Pi machine and older Python2 version. It didn't take a long to adjust the open-source code cloned from the GitHub for my specific needs.

The forked project with changes (in case you need to use the sensor from your machine with the Python3 instead of no longer supported Python2 environment) is available on my GitHub fork of the original project.

A nice byproduct is that I realized I can add a measurements history to the sensor web page and I created a pull request to the original project which is now merged and available for everyone using this code with the Raspberry Pi :)

The cover image is created by the Foto-Rabe

Discussion (0)

pic
Editor guide