mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-12-16 18:48:26 +01:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5802cf17f6 | ||
|
|
4a4ce89f00 | ||
|
|
8985e08a00 | ||
|
|
e984aced18 | ||
|
|
73edf56c97 | ||
|
|
e54c62a2ef | ||
|
|
5c95f011e4 | ||
|
|
bed448e7d6 | ||
|
|
eb8378adfa | ||
|
|
f94ed5c5f5 | ||
|
|
9471f3e323 | ||
|
|
e6d90372c2 | ||
|
|
fabf0550fc | ||
|
|
ce0af5bf60 | ||
|
|
93bdbd85d5 | ||
|
|
29f583f20d | ||
|
|
0f6a2fe908 | ||
|
|
e3ce2c41be | ||
|
|
92b3c69b98 | ||
|
|
f4d518aa87 | ||
|
|
831c844c24 | ||
|
|
060a7f6815 | ||
|
|
77859bea22 | ||
|
|
21b9ddb2ed | ||
|
|
1ee05da5d1 |
23
README.md
23
README.md
@@ -20,13 +20,32 @@ Make sure you have exactly the versions of libraries and boards installed as des
|
||||
|
||||
If you have an older version of the AirGradient PCB not mentioned in the example files, please downgrade this library to version 2.4.15 to support these legacy boards.
|
||||
|
||||
### Release Process
|
||||
|
||||
Releases published on GitHub are **not immediately deployed to all devices in the market**. Each release first goes through internal testing, including limited deployments in select locations to verify stability and functionality.
|
||||
|
||||
If the tests pass, the firmware is then made available for:
|
||||
- **FOTA (Firmware Over-The-Air) updates** from AirGradient dashboard
|
||||
- **Manual flashing** via [Airgradient](https://www.airgradient.com/documentation/firmwares/) website
|
||||
|
||||
Each GitHub release note will also include the planned rollout date for wider availability.
|
||||
|
||||
## Help & Support
|
||||
|
||||
If you have any questions or problems, check out [our forum](https://forum.airgradient.com/).
|
||||
|
||||
## Documentation
|
||||
## Development
|
||||
|
||||
Local server API documentation is available in [/docs/local-server.md](/docs/local-server.md) and AirGradient server API on [https://api.airgradient.com/public/docs/api/v1/](https://api.airgradient.com/public/docs/api/v1/).
|
||||
* See [compilation instructions](/docs/howto-compile.md) for details about how to customize AirGradient's firmware and flash it to your device.
|
||||
|
||||
## Over the air (OTA) updates
|
||||
|
||||
* See the [OTA Updates documentation](/docs/ota-updates.md) for details about how AirGradient monitors receive over the air updates.
|
||||
|
||||
## API documentation
|
||||
|
||||
* [Local server API documentation](/docs/local-server.md)
|
||||
* [AirGradient Cloud server API documentation](https://api.airgradient.com/public/docs/api/v1/).
|
||||
|
||||
## The following libraries have been integrated into this library for ease of use
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ Choose based on how python installed on your machine. But most user, using `apt`
|
||||
|
||||
## How to contribute
|
||||
|
||||
The instructions above are the instructions for how to build an official release of the AirGradient firmware using the Arduino IDE. If you intend to make changes that will you intent to contribute back to the main project, instead of installing the AirGradient library, check out the repo at `Documents/Arduino/libraries` (for Windows and Mac), or `~/Arduino/Libraries` (Linux). If you installed the library, you can remove it from the library manager in the Arduino IDE, or just delete the directory.
|
||||
The instructions above are the instructions for how to build an official release of the AirGradient firmware using the Arduino IDE. If you intend to make changes which you plan to contribute back to the main project, instead of installing the AirGradient library, check out the repository at Documents/Arduino/libraries (for Windows and Mac) or ~/Arduino/libraries (for Linux). If you installed the library, you can remove it from the library manager in the Arduino IDE, or just delete the directory.
|
||||
|
||||
**NOTE:** When cloning the repository, for version >= 3.3.0 it has submodule, please use `--recursive` flag like this: `git clone --recursive https://github.com/airgradienthq/arduino.git AirGradient_Air_Quality_Sensor`
|
||||
|
||||
@@ -100,6 +100,3 @@ There are 2 environment options to compile this project, PlatformIO and ArduinoI
|
||||
|
||||
- For PlatformIO, it should work out of the box
|
||||
- For arduino, files in `src` folder and also from `Examples` can be modified at `Documents/Arduino/libraries` for Windows and Mac, and `~/Arduino/Libraries` for Linux
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -106,7 +106,6 @@ Compensated values apply correction algorithms to make the sensor values more ac
|
||||
"pm02": {
|
||||
"correctionAlgorithm": "epa_2021",
|
||||
"slr": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ void checkForFirmwareUpdate(void) {
|
||||
if (networkOption == UseWifi) {
|
||||
agOta = new AirgradientOTAWifi;
|
||||
} else {
|
||||
agOta = new AirgradientOTACellular(cellularCard);
|
||||
agOta = new AirgradientOTACellular(cellularCard, agClient->getICCID());
|
||||
}
|
||||
|
||||
// Indicate main task that firmware update is in progress
|
||||
@@ -1664,11 +1664,11 @@ void networkingTask(void *args) {
|
||||
|
||||
// Run scheduler
|
||||
networkSignalCheckSchedule.run();
|
||||
configSchedule.run();
|
||||
transmissionSchedule.run();
|
||||
configSchedule.run();
|
||||
checkForUpdateSchedule.run();
|
||||
|
||||
delay(1000);
|
||||
delay(50);
|
||||
}
|
||||
|
||||
vTaskDelete(handleNetworkTask);
|
||||
|
||||
@@ -202,14 +202,14 @@ String OpenMetrics::getPayload(void) {
|
||||
}
|
||||
if (utils::isValidNOx(nox)) {
|
||||
add_metric("nox_index",
|
||||
"The processed Nitrous Oxide (NOx) index as measured by the "
|
||||
"The processed Nitrogen Oxide (NOx) index as measured by the "
|
||||
"AirGradient SGP sensor",
|
||||
"gauge");
|
||||
add_metric_point("", String(nox));
|
||||
}
|
||||
if (utils::isValidNOx(noxRaw)) {
|
||||
add_metric("nox_raw",
|
||||
"The raw input value to the Nitrous Oxide (NOx) index as "
|
||||
"The raw input value to the Nitrogen Oxide (NOx) index as "
|
||||
"measured by the AirGradient SGP sensor",
|
||||
"gauge");
|
||||
add_metric_point("", String(noxRaw));
|
||||
|
||||
@@ -8,8 +8,8 @@ AgSchedule::~AgSchedule() {}
|
||||
void AgSchedule::run(void) {
|
||||
uint32_t ms = (uint32_t)(millis() - count);
|
||||
if (ms >= period) {
|
||||
handler();
|
||||
count = millis();
|
||||
handler();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
#define RGB_COLOR_R 255, 0, 0 /** Red */
|
||||
#define RGB_COLOR_G 0, 255, 0 /** Green */
|
||||
#define RGB_COLOR_Y 255, 150, 0 /** Yellow */
|
||||
#define RGB_COLOR_O 255, 40, 0 /** Orange */
|
||||
#define RGB_COLOR_Y 255, 255, 0 /** Yellow */
|
||||
#define RGB_COLOR_O 255, 128, 0 /** Orange */
|
||||
#define RGB_COLOR_P 180, 0, 255 /** Purple */
|
||||
#define RGB_COLOR_CLEAR 0, 0, 0 /** No color */
|
||||
|
||||
|
||||
Submodule src/Libraries/airgradient-client updated: a4ac14936e...c23bb2ceac
Submodule src/Libraries/airgradient-ota updated: c772392427...7b103e9073
@@ -260,13 +260,14 @@ bool MqttClient::connect(String id) {
|
||||
connected = false;
|
||||
if (user.isEmpty()) {
|
||||
logInfo("Connect without auth");
|
||||
if(CLIENT()->connect(id.c_str())) {
|
||||
connected = true;
|
||||
}
|
||||
return connected;
|
||||
connected = CLIENT()->connect(id.c_str());
|
||||
} else {
|
||||
logInfo("Connect with auth");
|
||||
connected = CLIENT()->connect(id.c_str(), user.c_str(), password.c_str());
|
||||
}
|
||||
return CLIENT()->connect(id.c_str(), user.c_str(), password.c_str());
|
||||
return connected;
|
||||
}
|
||||
|
||||
void MqttClient::handle(void) {
|
||||
if (isBegin == false) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user