Giter VIP home page Giter VIP logo

airquality's Introduction

Air Quality Index

===========================================================

This library will store PM2.5 and PM10. Based on the captured data and the region setting, it can calculate an air qualityindex that is applicable for that region. The data during-hour and during-day is stored RAM and at end-of-day it will be combined with data from previous days that is stored in NVRAM.
See the seperate document (AQI-odt) for reasons and more information

Getting Started

As part of a longer term project to understand air quality, I have been working to test and implement different sensors. One of the aspects that keeps coming back is Air Quality Index (AQI). Actually I should say index-es. (plural)
There are MANY different AQI definitions and while they all provide an indication of the air quality: they are not the same. They use different bands/ranges, different limits, different pollutants, different timing (hourly, daily or yearly), different….. different…
Next to AQI in the different regions of the world (some have multiple AQI in the same region) there are also suppliers that have added to the confusion by creating their own definition.

While most AQI use a combination of pollutants, this library is only using PM2.5 and/or PM10 to determine an index. So it is not a 100% correct.

I have used the Air Quality definitions from the USA, Europe, India, Canada and UK.

It is designed and tested for ESP32 and supports ESP8266. See document for reasons

Prerequisites

Examples 10 has a dependency on other libraries. Documented in sketch.

Software installation

Obtain the zip and install like any other

Program usage

Program options

Please see the description in the top of the sketch and read the documentation (odt)

Versioning

version 1.0 / March 2019

  • Initial version ESP32

version 1.0.1 / March 2019

  • Added base-option to GetAqi()
  • number cosmetic changes

version 1.0.2 / March 2019

version 1.0.3 / March 2020

  • Fixed compiler warnings with IDE 1.8.12

Author

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE 3.0

Acknowledgements

https://en.wikipedia.org/wiki/Air_quality_index

airquality's People

Contributors

paulvha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

airquality's Issues

FloatToByte compiler error

Setup:
Arduino IDE 1.8.12
ESP8266 2.7.1
ESP32 1.0.4
airquality example: example10_sps30_aqi.ino version 1.0.3 / March 2020
Board selected , Sparkfun thing, WEMOS D1 , ...

Compiler error:
FloattoByte declaration throws error.
... aqi.cpp:353:17: error: expected ';' before 'conv'
FloatToBYTE conv;

Attempts to solve issue:
I can not identify where in aqi.h or aqi.cpp the error is as both files look ok to me.
Documentation states that example 10 has dependencies and to look for them in code. I can not find dependencies listed.
There is call of EEPROM.begin(AQISIZE) which in my esp8266 setup is of return type void while in example program return type boolean is expected. I dont think this is related to declaration error described here unless a new EEPROM library was developed which also affects FloatToByte declaration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.