Twitter icon
Facebook icon
LinkedIn icon
Google icon
Reddit icon
StumbleUpon icon
Del.icio.us icon

Arduino Air Quality Monitor

Added to IoTplaybook or last updated on: 11/19/2020
Arduino Air Quality Monitor

Story

The open, local, real-time air quality data from PurpleAir has been super valuable during the pollution we've experienced over the past few months. I was also happy to see they even used the Arduino IDE to create this product!

I've found myself checking PurpleAir's map multiple times a day - then realized the Arduino could just read the value itself and display the color on an LED display - so you would always know when it's good to go outside.

This project uses the Arduino MKR WiFi 1010 and RGB shield which is a really neat, simple combination of hardware - just add a USB power supply. As the components inside a connected LED lamp, it would look really good behind some translucent white plastic casing - I haven't got around to doing this but I am sure you can get creative.

In the Arduino sketch to perform the HTTP GET and JSON data processing, we're using the Arduino_HttpClient and Arduino_JSON libraries which make this Arduino code nice and compact.

Things used in this project

Hardware components

Arduino MKR WiFi 1010
Arduino MKR WiFi 1010
 
× 1

Newark

Arduino.cc

 
Arduino MKR RGB Shield
 
× 1

Arduino.cc

Entering details into secrets.h

You need to go into the secrets.h tab of the Arduino IDE project and add your WIFI credentials, as well as the ID of the PurpleAir sensor you'd like to monitor.

You can find the nearest sensor to you on the www.purpleair.com map, zoom in and take a look at the value of the select parameter (see below).

After that you can compile, upload to your Arduino and you should be good to go!

Disclaimer

This is a project I made as I found it useful, and I decided to share it with the world in case others do too. Please do not solely rely on this if you are concerned about the medical effects of air pollution...

Code

AirQualityMonitor.ino

Credits

8bitkick

8bitkick

 

Hackster.io

This content is provided by our content partner Hackster.io, an Avnet developer community for learning, programming, and building hardware. Visit them online for more great content like this.

This article was originally published at Hackster.io. It was added to IoTplaybook or last modified on 11/19/2020.