From a58828a527fb263ba6a96cbebc661eb2e29681dc Mon Sep 17 00:00:00 2001 From: Hpsaturn Date: Thu, 17 Feb 2022 12:16:53 +0100 Subject: [PATCH 1/5] testing solar mode flag from firmware preset --- src/Sensors.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Sensors.hpp b/src/Sensors.hpp index f109dfc6..6c0c2dad 100644 --- a/src/Sensors.hpp +++ b/src/Sensors.hpp @@ -160,6 +160,9 @@ class Sensors { // only detect i2c sensors bool i2conly; + // Solar station mode (power saving features) + bool solarmode = false; + /***************************************** * I2C sensors: ****************************************/ From 2f68c779a14d42f3bcf0d016d020826becc0c6c9 Mon Sep 17 00:00:00 2001 From: Hpsaturn Date: Sat, 19 Feb 2022 11:53:17 +0100 Subject: [PATCH 2/5] removed power settings improvements for now --- src/Sensors.cpp | 7 ------- src/Sensors.hpp | 3 --- 2 files changed, 10 deletions(-) diff --git a/src/Sensors.cpp b/src/Sensors.cpp index 70cb7d63..c8b7db2b 100644 --- a/src/Sensors.cpp +++ b/src/Sensors.cpp @@ -722,11 +722,6 @@ bool Sensors::sps30Read() { if (!isSensorRegistered(SENSORS::SSPS30)) return false; uint8_t ret, error_cnt = 0; delay(35); //Delay for sincronization - - if(i2conly && sample_time > 30) { - if (!sps30.start()) return false; // power saving validation - delay(15000); - } do { ret = sps30.GetValues(&val); @@ -754,8 +749,6 @@ bool Sensors::sps30Read() { unitRegister(UNIT::PM4); unitRegister(UNIT::PM10); - if(i2conly && sample_time > 30) sps30.stop(); // power saving validation - if (pm25 > 1000 && pm10 > 1000) { onSensorError("[W][SLIB] SPS30 setup message \t: out of range pm25 > 1000"); return false; diff --git a/src/Sensors.hpp b/src/Sensors.hpp index 6c0c2dad..f109dfc6 100644 --- a/src/Sensors.hpp +++ b/src/Sensors.hpp @@ -160,9 +160,6 @@ class Sensors { // only detect i2c sensors bool i2conly; - // Solar station mode (power saving features) - bool solarmode = false; - /***************************************** * I2C sensors: ****************************************/ From 41805ec7676b5da4ae4f7003bef36856161fb5e9 Mon Sep 17 00:00:00 2001 From: roberbike Date: Sat, 19 Feb 2022 23:35:20 +0100 Subject: [PATCH 3/5] Add M5PICOD4 board --- src/Sensors.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Sensors.hpp b/src/Sensors.hpp index f109dfc6..3fb0ec0a 100644 --- a/src/Sensors.hpp +++ b/src/Sensors.hpp @@ -64,6 +64,11 @@ #define PMS_RX 23 #define PMS_TX 33 #define DHT_SENSOR_PIN 19 +#elif M5PICOD4 +#define PMS_RX 3 +#define PMS_TX 1 +#define DHT_SENSOR_PIN 19 + #else // **DEFAULT** for legacy CanAirIO devices: #define PMS_RX 17 // D1MIN1 / TTGOT7 / ESP32DEVKIT, also for main ESP32 dev boards use it #define PMS_TX 16 From d4784153ce38ed42bdec899c92690848407c88ed Mon Sep 17 00:00:00 2001 From: Hpsaturn Date: Sun, 20 Feb 2022 00:37:05 +0100 Subject: [PATCH 4/5] fixed link issues on Arduino libraries reference --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd9217e6..a45f02d2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # Air Quality Sensors Library -Generic sensor manager, abstractions and bindings of multiple sensors libraries: Honeywell, Plantower, Panasonic, Sensirion, etc. and CO2 sensors. Also it's handling others environment sensors. This library is for general purpose, but also is the sensors library base of [CanAirIO project](https://canair.io/docs). +Generic sensor manager, abstractions and bindings of multiple sensors [libraries](https://github.com/kike-canaries/canairio_sensorlib/blob/master/platformio.ini#L18-L34): Honeywell, Plantower, Panasonic, Sensirion, etc. and CO2 sensors. Also it's handling others environment sensors. This library is for general purpose, but also is the sensors library base of [CanAirIO project](https://canair.io/docs). For developers also you can check the complete library documentation [here](http://hpsaturn.com/canairio_sensorlib_doc/html/index.html) @@ -291,7 +291,7 @@ Only import the `ino` file of the sample and install the libraries listed on `li #### Prerequisites -For run the examples, you first need to install **arduino-cli** or the **Arduino IDE** with the libraries referenced in **lib_deps** on the file [platformio.ini](https://github.com/kike-canaries/canairio_sensorlib/blob/fix_ondataready_cb/platformio.ini), becuase **Arduino don't install it automatically** like PlatformIO. Then put CanAirIO sensor library in your library directory, you can download it from [releases](https://github.com/kike-canaries/canairio_sensorlib/releases) section. +For run the examples, you first need to install **arduino-cli** or the **Arduino IDE** with the libraries referenced in **lib_deps** on the file [platformio.ini](https://github.com/kike-canaries/canairio_sensorlib/blob/master/platformio.ini), becuase **Arduino don't install it automatically** like PlatformIO. Then put CanAirIO sensor library in your library directory, you can download it from [releases](https://github.com/kike-canaries/canairio_sensorlib/releases) section. Also you need to add the **alternative links** for supporting the ESP32 boards: From dd118d67d790db601c9a7d9e17db6fb9c891ed7e Mon Sep 17 00:00:00 2001 From: Hpsaturn Date: Sun, 20 Feb 2022 21:25:39 +0100 Subject: [PATCH 5/5] v0.5.4 rev357 updated libraries dependencies and revision number --- library.json | 7 +++---- library.properties | 2 +- platformio.ini | 16 +++++++++++++--- src/Sensors.hpp | 4 ++-- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/library.json b/library.json index bdf32241..d60c3489 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "CanAirIO Air Quality Sensors Library", - "version": "0.5.3", + "version": "0.5.4", "homepage":"https://canair.io", "keywords": [ @@ -41,7 +41,6 @@ "frameworks": ["espidf", "freertos", "arduino"], "platforms": [ - "atmelavr", "teensy", "espressif32", "espressif8266" @@ -78,9 +77,9 @@ {"name":"Adafruit BME280 Library", "owner":"adafruit","version":"2.2.2"}, {"name":"Adafruit BMP280 Library", "owner":"adafruit","version":"2.6.1"}, {"name":"Adafruit BME680 Library","owner":"adafruit","version":"2.0.1"}, - {"name":"Adafruit BusIO", "owner":"adafruit","version":"1.11.0"}, + {"name":"Adafruit BusIO", "owner":"adafruit","version":"1.11.1"}, {"name":"Adafruit SHT31 Library", "owner":"adafruit","version":"2.0.0"}, - {"name":"AM232X", "owner":"robtillaart", "version":"0.4.0"}, + {"name":"AM232X", "owner":"robtillaart", "version":"0.4.1"}, {"name":"AHT10", "owner":"enjoyneering","version":"1.1.0"}, {"name":"sps30", "owner":"paulvha","version":"1.4.12"}, {"name":"MH-Z19", "owner":"wifwaf", "version":"1.5.3"}, diff --git a/library.properties b/library.properties index b2c57e54..7830c6c8 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=CanAirIO Air Quality Sensors Library -version=0.5.3 +version=0.5.4 author=@hpsaturn, CanAirIO project maintainer=Antonio Vanegas url=https://github.com/kike-canaries/canairio_sensorlib diff --git a/platformio.ini b/platformio.ini index 03bc83bb..01fd9794 100644 --- a/platformio.ini +++ b/platformio.ini @@ -19,9 +19,9 @@ lib_deps = adafruit/Adafruit BME280 Library @ 2.2.2 adafruit/Adafruit BMP280 Library @ 2.6.1 adafruit/Adafruit BME680 Library @ 2.0.1 - adafruit/Adafruit BusIO @ 1.11.0 + adafruit/Adafruit BusIO @ 1.11.1 adafruit/Adafruit SHT31 Library @ 2.0.0 - robtillaart/AM232X @ 0.4.0 + robtillaart/AM232X @ 0.4.1 enjoyneering/AHT10 @ 1.1.0 paulvha/sps30 @ 1.4.12 wifwaf/MH-Z19 @ 1.5.3 @@ -53,7 +53,6 @@ build_flags = lib_deps = ${env.lib_deps} - [arduino_avr] platform = atmelavr board = pro16MHzatmega328 @@ -80,6 +79,17 @@ src_filter = -<*> + extends = esp32_common src_filter = -<*> + +; [env:teensy36] +; platform = teensy +; framework = arduino +; board = teensy36 +; upload_speed = ${env.upload_speed} +; monitor_speed = ${env.monitor_speed} +; lib_deps = ${env.lib_deps} +; build_flags = +; ${env.build_flags} +; -D TEENSY_OPT_SMALLEST_CODE + ;[env:arduino] ;extends = arduino_avr ;src_filter = -<*> + diff --git a/src/Sensors.hpp b/src/Sensors.hpp index 3fb0ec0a..ca0bda3f 100644 --- a/src/Sensors.hpp +++ b/src/Sensors.hpp @@ -17,8 +17,8 @@ #include #include -#define CSL_VERSION "0.5.3" -#define CSL_REVISION 356 +#define CSL_VERSION "0.5.4" +#define CSL_REVISION 357 /*************************************************************** * S E T U P E S P 3 2 B O A R D S A N D F I E L D S