Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving sum feature #139

Merged
merged 16 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These are supported funding model platforms

liberapay: CanAirIO

github: hpsaturn
158 changes: 0 additions & 158 deletions examples/Radiation_CAJOE/Radiation_CAJOE.ino

This file was deleted.

64 changes: 64 additions & 0 deletions examples/radiation_CAJOE/radiation_CAJOE.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/**
* @file main.cpp
* @author Antonio Vanegas @hpsaturn
* @date June 2018 - 2022
* @brief Radiation sensor example
* @license GPL3
*
* Full documentation:
* https://github.com/kike-canaries/canairio_sensorlib#canairio-air-quality-sensors-library
*
* Full implementation for WiFi and Bluetooth Air Quality fixed and mobile station:
* https://github.com/kike-canaries/canairio_firmware#canairio-firmware
*
* CanAirIO project:
* https://canair.io
*
* CanAirIO Docs:
* https://canair.io/docs
*
*/

#include <Arduino.h>
#include <Sensors.hpp>

void onSensorDataOk() {
Serial.print(" CO2: " + sensors.getStringCO2());
Serial.print(" CO2humi: " + String(sensors.getCO2humi()));
Serial.print(" CO2temp: " + String(sensors.getCO2temp()));

Serial.print(" H: " + String(sensors.getHumidity()));
Serial.println(" T: " + String(sensors.getTemperature()));
}

void onSensorDataError(const char* msg) {
Serial.println(msg);
}

/******************************************************************************
* M A I N
******************************************************************************/

void setup() {
Serial.begin(115200);
delay(1000);

Serial.println("\n== Sensor test setup ==\n");
Serial.println("-->[SETUP] Detecting sensors..");

sensors.setSampleTime(5); // config sensors sample time interval
sensors.setOnDataCallBack(&onSensorDataOk); // all data read callback
sensors.setOnErrorCallBack(&onSensorDataError); // [optional] error callback
sensors.setDebugMode(true); // [optional] debug mode
sensors.detectI2COnly(true); // [optional] skip UART detection

sensors.init(); // forced UAQ sensor. Empty for auto detection

delay(500);
}

void loop() {
sensors.loop(); // read sensor data and showed it
}


14 changes: 9 additions & 5 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ lib_deps =
https://github.com/jcomas/CM1106_UART.git

[esp32_common]
platform = espressif32
platform = espressif32 @ 3.2.0
board = esp32dev
framework = ${env.framework}
upload_speed = ${env.upload_speed}
Expand Down Expand Up @@ -65,19 +65,23 @@ lib_deps =

[env:esp8266full]
extends = esp8266_common
src_filter = -<*> +<platformio/>
build_src_filter = -<*> +<platformio/>

[env:esp32sps30i2c]
extends = esp32_common
src_filter = -<*> +<sps30i2c/>
build_src_filter = -<*> +<sps30i2c/>

[env:esp32full]
extends = esp32_common
src_filter = -<*> +<platformio/>
build_src_filter = -<*> +<platformio/>

[env:esp32]
extends = esp32_common
src_filter = -<*> +<advanced_multivariable/>
build_src_filter = -<*> +<advanced_multivariable/>

[env:esp32_radiation]
extends = esp32_common
build_src_filter = -<*> +<radiation_CAJOE/>

; [env:teensy36]
; platform = teensy
Expand Down
Loading