mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-06-28 09:10:57 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
3889aa660e | |||
efe68a54a4 | |||
a960d086e1 | |||
3537a3012c | |||
d255e6ad04 | |||
e47096feac | |||
063612e08f | |||
7cfa722684 | |||
53285ab4ff |
3
.github/workflows/check.yml
vendored
3
.github/workflows/check.yml
vendored
@ -11,6 +11,7 @@ jobs:
|
|||||||
- "TestCO2"
|
- "TestCO2"
|
||||||
- "TestPM"
|
- "TestPM"
|
||||||
- "TestSht"
|
- "TestSht"
|
||||||
|
- "OneOpenAir"
|
||||||
fqbn:
|
fqbn:
|
||||||
- "esp8266:esp8266:d1_mini"
|
- "esp8266:esp8266:d1_mini"
|
||||||
- "esp32:esp32:esp32c3"
|
- "esp32:esp32:esp32c3"
|
||||||
@ -28,6 +29,8 @@ jobs:
|
|||||||
fqbn: "esp8266:esp8266:d1_mini"
|
fqbn: "esp8266:esp8266:d1_mini"
|
||||||
- example: "Open_Air"
|
- example: "Open_Air"
|
||||||
fqbn: "esp8266:esp8266:d1_mini"
|
fqbn: "esp8266:esp8266:d1_mini"
|
||||||
|
- example: "OneOpenAir"
|
||||||
|
fqbn: "esp8266:esp8266:d1_mini"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -25,7 +25,7 @@ Important flashing settings:
|
|||||||
- Flash frequency "80Mhz"
|
- Flash frequency "80Mhz"
|
||||||
- Flash mode "QIO"
|
- Flash mode "QIO"
|
||||||
- Flash size "4MB"
|
- Flash size "4MB"
|
||||||
- Partition scheme "Default 4MB with spiffs (1.2MB APP/1,5MB SPIFFS)"
|
- Partition scheme "Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)"
|
||||||
- JTAG adapter "Disabled"
|
- JTAG adapter "Disabled"
|
||||||
|
|
||||||
Configuration parameters, e.g. Celsius / Fahrenheit or PM unit (US AQI vs ug/m3)
|
Configuration parameters, e.g. Celsius / Fahrenheit or PM unit (US AQI vs ug/m3)
|
||||||
@ -493,13 +493,8 @@ private:
|
|||||||
|
|
||||||
void loadConfig(void) {
|
void loadConfig(void) {
|
||||||
if (EEPROM.readBytes(0, &config, sizeof(config)) != sizeof(config)) {
|
if (EEPROM.readBytes(0, &config, sizeof(config)) != sizeof(config)) {
|
||||||
config.inF = false;
|
|
||||||
config.inUSAQI = false;
|
|
||||||
config.useRGBLedBar = UseLedBarCO2; // default use LED bar for CO2
|
|
||||||
memset(config.models, 0, sizeof(config.models));
|
|
||||||
memset(config.mqttBrokers, 0, sizeof(config.mqttBrokers));
|
|
||||||
|
|
||||||
Serial.println("Load configure failed");
|
Serial.println("Load configure failed");
|
||||||
|
defaultConfig();
|
||||||
} else {
|
} else {
|
||||||
uint32_t sum = 0;
|
uint32_t sum = 0;
|
||||||
uint8_t *data = (uint8_t *)&config;
|
uint8_t *data = (uint8_t *)&config;
|
||||||
@ -809,7 +804,7 @@ void setup() {
|
|||||||
/**
|
/**
|
||||||
* Send first data to ping server and get server configuration
|
* Send first data to ping server and get server configuration
|
||||||
*/
|
*/
|
||||||
if (WiFi.status() == WL_CONNECTED) {
|
if (WiFi.isConnected()) {
|
||||||
webServerInit();
|
webServerInit();
|
||||||
|
|
||||||
/** MQTT init */
|
/** MQTT init */
|
||||||
@ -1458,6 +1453,10 @@ static void displayShowDashboard(String err) {
|
|||||||
/** Show CO2 value */
|
/** Show CO2 value */
|
||||||
u8g2.setFont(u8g2_font_t0_22b_tf);
|
u8g2.setFont(u8g2_font_t0_22b_tf);
|
||||||
if (co2Ppm > 0) {
|
if (co2Ppm > 0) {
|
||||||
|
int val = 9999;
|
||||||
|
if (co2Ppm < 10000) {
|
||||||
|
val = co2Ppm;
|
||||||
|
}
|
||||||
sprintf(strBuf, "%d", co2Ppm);
|
sprintf(strBuf, "%d", co2Ppm);
|
||||||
} else {
|
} else {
|
||||||
sprintf(strBuf, "%s", "-");
|
sprintf(strBuf, "%s", "-");
|
||||||
|
3040
examples/OneOpenAir/OneOpenAir.ino
Normal file
3040
examples/OneOpenAir/OneOpenAir.ino
Normal file
File diff suppressed because it is too large
Load Diff
@ -25,7 +25,7 @@ Important flashing settings:
|
|||||||
- Flash frequency "80Mhz"
|
- Flash frequency "80Mhz"
|
||||||
- Flash mode "QIO"
|
- Flash mode "QIO"
|
||||||
- Flash size "4MB"
|
- Flash size "4MB"
|
||||||
- Partition scheme "Default 4MB with spiffs (1.2MB APP/1,5MB SPIFFS)"
|
- Partition scheme "Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)"
|
||||||
- JTAG adapter "Disabled"
|
- JTAG adapter "Disabled"
|
||||||
|
|
||||||
If you have any questions please visit our forum at
|
If you have any questions please visit our forum at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name=AirGradient Air Quality Sensor
|
name=AirGradient Air Quality Sensor
|
||||||
version=3.0.8
|
version=3.0.9
|
||||||
author=AirGradient <support@airgradient.com>
|
author=AirGradient <support@airgradient.com>
|
||||||
maintainer=AirGradient <support@airgradient.com>
|
maintainer=AirGradient <support@airgradient.com>
|
||||||
sentence=ESP32-C3 / ESP8266 library for air quality monitor measuring PM, CO2, Temperature, TVOC and Humidity with OLED display.
|
sentence=ESP32-C3 / ESP8266 library for air quality monitor measuring PM, CO2, Temperature, TVOC and Humidity with OLED display.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "AirGradient.h"
|
#include "AirGradient.h"
|
||||||
|
|
||||||
#define AG_LIB_VER "3.0.8"
|
#define AG_LIB_VER "3.0.9"
|
||||||
|
|
||||||
AirGradient::AirGradient(BoardType type)
|
AirGradient::AirGradient(BoardType type)
|
||||||
: pms5003(type), pms5003t_1(type), pms5003t_2(type), s8(type), sgp41(type),
|
: pms5003(type), pms5003t_1(type), pms5003t_2(type), s8(type), sgp41(type),
|
||||||
|
Reference in New Issue
Block a user