From c270cda600fb345b16ff818f0fbbec844f4c25c1 Mon Sep 17 00:00:00 2001 From: achim Date: Tue, 8 Jun 2021 08:33:51 +0700 Subject: [PATCH] Updated library to work with ESP8266 board manager version 3.0.0 --- AirGradient.cpp | 2 +- README.md | 4 +- examples/C02_PM_SHT/.DS_Store | Bin 6148 -> 0 bytes .../C02_PM_SHT_OLED_WIFI.ino | 11 ++--- examples/C02_SIMPLE/C02_SIMPLE.ino | 18 ++++++++ examples/MHZ19_SIMPLE/MHZ19_SIMPLE.ino | 16 ------- examples/PM2_SIMPLE/PM2_SIMPLE.ino | 18 ++++++++ examples/SHT_SIMPLE/SHT_SIMPLE.ino | 18 ++++++++ library.properties | 2 +- readme.txt | 41 +++--------------- 10 files changed, 69 insertions(+), 61 deletions(-) delete mode 100644 examples/C02_PM_SHT/.DS_Store delete mode 100644 examples/MHZ19_SIMPLE/MHZ19_SIMPLE.ino diff --git a/AirGradient.cpp b/AirGradient.cpp index 94ad002..ac6232e 100644 --- a/AirGradient.cpp +++ b/AirGradient.cpp @@ -11,7 +11,7 @@ #include #include "Arduino.h" #include -#include +#include // Constructor ///////////////////////////////////////////////////////////////// diff --git a/README.md b/README.md index b84870d..d104903 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,6 @@ AirGradient Arduino Library for ESP8266 (Wemos D1 MINI) Build your own low cost air quality sensor with optional display measuring PM2.5, CO2, Temperature and Humidity. -This library makes it easy to read the sensor data from the Plantower PMS5003 PM2.5 sensor, the Senseair S8 and the SHT30/31 Temperature and Humidity sensor. Visit our blog for detailed build instructions and PCB layout. +This library makes it easy to read the sensor data from the Plantower PMS5003 PM2.5 sensor, the Senseair S8 and the SHT30/31 Temperature and Humidity sensor. Visit our DIY section for detailed build instructions and PCB layout. -https://www.airgradient.com/blog/ \ No newline at end of file +https://www.airgradient.com/diy/ diff --git a/examples/C02_PM_SHT/.DS_Store b/examples/C02_PM_SHT/.DS_Store deleted file mode 100644 index e4db637d0c9192e661b159d9db37d9e9317ba2da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmZQzU|@7AO)+F(5MW?n;9!8z3~dZp0Z1N%F(jFwB8(vOz-9z6_%g&Z1T%Orgh1s8 zQ6Rk{49*M&3`Pv`49NQ98T=W17+e`#7~&bi89W)>7(7#olXH^t^K(F&2pK#oKNKwT0L4c5-U2(}r- z2Ww|w1l!EOzzEUKzzDUO5!ypxglK1AglK1A1ltaC-6%a80;3@S3jt;bLjY9&yD~7~ z>i AirGradient ag = AirGradient(); diff --git a/examples/MHZ19_SIMPLE/MHZ19_SIMPLE.ino b/examples/MHZ19_SIMPLE/MHZ19_SIMPLE.ino deleted file mode 100644 index 4262150..0000000 --- a/examples/MHZ19_SIMPLE/MHZ19_SIMPLE.ino +++ /dev/null @@ -1,16 +0,0 @@ -#include -AirGradient ag = AirGradient(); - -void setup(){ - Serial.begin(9600); - ag.MHZ19_Init(MHZ19B); -} - -void loop(){ - -int MHZ19_C02 = ag.readMHZ19(); -Serial.print("C02: "); -Serial.println(MHZ19_C02); - -delay(5000); -} diff --git a/examples/PM2_SIMPLE/PM2_SIMPLE.ino b/examples/PM2_SIMPLE/PM2_SIMPLE.ino index 9f338aa..18fdf39 100644 --- a/examples/PM2_SIMPLE/PM2_SIMPLE.ino +++ b/examples/PM2_SIMPLE/PM2_SIMPLE.ino @@ -1,3 +1,21 @@ +/* +This is the code for the AirGradient DIY Air Quality Sensor with an ESP8266 Microcontroller. + +It is a high quality sensor showing PM2.5, CO2, Temperature and Humidity on a small display and can send data over Wifi. + +For build instructions please visit https://www.airgradient.com/diy/ + +Compatible with the following sensors: +Plantower PMS5003 (Fine Particle Sensor) + +Please install ESP8266 board manager (tested with version 3.0.0) + +If you are a school or university contact us for a free trial on the AirGradient platform. +https://www.airgradient.com/schools/ + +MIT License +*/ + #include AirGradient ag = AirGradient(); diff --git a/examples/SHT_SIMPLE/SHT_SIMPLE.ino b/examples/SHT_SIMPLE/SHT_SIMPLE.ino index 26655fc..d9fbdcd 100644 --- a/examples/SHT_SIMPLE/SHT_SIMPLE.ino +++ b/examples/SHT_SIMPLE/SHT_SIMPLE.ino @@ -1,3 +1,21 @@ +/* +This is the code for the AirGradient DIY Air Quality Sensor with an ESP8266 Microcontroller. + +It is a high quality sensor showing PM2.5, CO2, Temperature and Humidity on a small display and can send data over Wifi. + +For build instructions please visit https://www.airgradient.com/diy/ + +Compatible with the following sensors: +SHT30/31 (Temperature/Humidity Sensor) + +Please install ESP8266 board manager (tested with version 3.0.0) + +If you are a school or university contact us for a free trial on the AirGradient platform. +https://www.airgradient.com/schools/ + +MIT License +*/ + #include AirGradient ag = AirGradient(); diff --git a/library.properties b/library.properties index bac7c83..c8a0c72 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=AirGradient Air Quality Sensor -version=1.3.4 +version=1.3.5 author=AirGradient maintainer=AirGradient sentence=ESP8266 library for an air quality sensor featuring PM2.5, CO2, Temperature and Humidity with OLED display. diff --git a/readme.txt b/readme.txt index c6112ba..d104903 100644 --- a/readme.txt +++ b/readme.txt @@ -1,39 +1,8 @@ -This is an example C++ library for Arduino 0004+, based on one created by -Nicholas Zambetti for Wiring 0006+ +AirGradient Arduino Library for ESP8266 (Wemos D1 MINI) +===================================================================================================== -Installation --------------------------------------------------------------------------------- +Build your own low cost air quality sensor with optional display measuring PM2.5, CO2, Temperature and Humidity. -To install this library, just place this entire folder as a subfolder in your -Arduino/lib/targets/libraries folder. - -When installed, this library should look like: - -Arduino/lib/targets/libraries/Test (this library's folder) -Arduino/lib/targets/libraries/Test/Test.cpp (the library implementation file) -Arduino/lib/targets/libraries/Test/Test.h (the library description file) -Arduino/lib/targets/libraries/Test/keywords.txt (the syntax coloring file) -Arduino/lib/targets/libraries/Test/examples (the examples in the "open" menu) -Arduino/lib/targets/libraries/Test/readme.txt (this file) - -Building --------------------------------------------------------------------------------- - -After this library is installed, you just have to start the Arduino application. -You may see a few warning messages as it's built. - -To use this library in a sketch, go to the Sketch | Import Library menu and -select Test. This will add a corresponding line to the top of your sketch: -#include - -To stop using this library, delete that line from your sketch. - -Geeky information: -After a successful build of this library, a new file named "Test.o" will appear -in "Arduino/lib/targets/libraries/Test". This file is the built/compiled library -code. - -If you choose to modify the code for this library (i.e. "Test.cpp" or "Test.h"), -then you must first 'unbuild' this library by deleting the "Test.o" file. The -new "Test.o" with your code will appear after the next press of "verify" +This library makes it easy to read the sensor data from the Plantower PMS5003 PM2.5 sensor, the Senseair S8 and the SHT30/31 Temperature and Humidity sensor. Visit our DIY section for detailed build instructions and PCB layout. +https://www.airgradient.com/diy/