DEV Community

Cover image for Using SDS011 particle sensor from my laptop (python3)
Vedran Vidovic
Vedran Vidovic

Posted on • Edited on

Using SDS011 particle sensor from my laptop (python3)

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

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

ACI image

ACI.dev: Fully Open-source AI Agent Tool-Use Infra (Composio Alternative)

100% open-source tool-use platform (backend, dev portal, integration library, SDK/MCP) that connects your AI agents to 600+ tools with multi-tenant auth, granular permissions, and access through direct function calling or a unified MCP server.

Check out our GitHub!