Skip to content

Commit 2befb1c

Browse files
committed
download cloud file
1 parent 3105663 commit 2befb1c

File tree

2 files changed

+3
-46
lines changed

2 files changed

+3
-46
lines changed

content/hardware/06.nicla/boards/nicla-sense-env/tutorials/environmental-monitor-application-note/content.md

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ Please, begin by creating a new Thing in your Arduino Cloud with the following v
630630
- cloudO3
631631
- cloudAQI
632632

633-
All of the variables must be **`float`** type, have **`Read & Write`** permission and a **`On Change`** update policy.
633+
All of the variables must be **`float`** type, have **`Read Only`** permission and a **`On Change`** update policy.
634634

635635
The complete example sketch is shown below.
636636

@@ -760,51 +760,6 @@ void readSensors() {
760760
Serial.println("- ERROR: One or more sensors are disabled.");
761761
}
762762
}
763-
764-
/**
765-
Function called when cloudTemperature variable changes.
766-
This function can be used to respond to changes in temperature values
767-
from the Arduino Cloud dashboard.
768-
*/
769-
void onCloudTemperatureChange() {
770-
// Add your code here to act upon temperature changes
771-
}
772-
773-
/**
774-
Function called when cloudHumidity variable changes.
775-
This function can be used to respond to changes in humidity values
776-
from the Arduino Cloud dashboard.
777-
*/
778-
void onCloudHumidityChange() {
779-
// Add your code here to act upon humidity changes
780-
}
781-
782-
/**
783-
Function called when cloudNO2 variable changes.
784-
This function can be used to respond to changes in NO₂ values
785-
from the Arduino Cloud dashboard.
786-
*/
787-
void onCloudNO2Change() {
788-
// Add your code here to act upon NO₂ changes
789-
}
790-
791-
/**
792-
Function called when cloudO3 variable changes.
793-
This function can be used to respond to changes in O₃ values
794-
from the Arduino Cloud dashboard.
795-
*/
796-
void onCloudO3Change() {
797-
// Add your code here to act upon O₃ changes
798-
}
799-
800-
/**
801-
Function called when cloudAQI variable changes.
802-
This function can be used to respond to changes in AQI values
803-
from the Arduino Cloud dashboard.
804-
*/
805-
void onCloudAQIChange() {
806-
// Add your code here to act upon AQI changes
807-
}
808763
```
809764

810765
The following sections will help you to understand the main parts of the example sketch shown before, which can be divided into the following:
@@ -950,6 +905,8 @@ In the code snippet shown before:
950905
- The RGB LED changes color based on the AQI value. Green for good air quality, yellow for moderate, and red for unhealthy levels.
951906
- The cloud variables (`cloudTemperature`, `cloudHumidity`, `cloudNO2`, `cloudO3`, and `cloudAQI`) are updated with the latest sensor readings and sent to Arduino Cloud for remote monitoring.
952907

908+
The complete cloud example sketch can be downloaded [here](assets/cloud_air_quality_monitor.zip).
909+
953910
## Conclusions
954911

955912
In this application note, we explored how to integrate a Portenta C33 board with a Nicla Sense Env board to monitor environmental data, such as temperature, humidity, NO₂, O₃, and AQI. We demonstrated also how Arduino Cloud allows for easy remote monitoring and real-time visualization of this data.

0 commit comments

Comments
 (0)