You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/06.nicla/boards/nicla-sense-env/tutorials/environmental-monitor-application-note/content.md
+5-10Lines changed: 5 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,12 +78,7 @@ This application note uses advanced sensors to provide accurate, real-time measu
78
78
79
79
The AQI scale ranges from 0 to 500, with the following classifications:
80
80
81
-
- 0-50: Good air quality.
82
-
- 51-100: Moderate air quality.
83
-
- 101-150: Unhealthy for sensitive groups.
84
-
- 151-200: Unhealthy for everyone.
85
-
- 201-300: Very unhealthy.
86
-
- 301-500: Hazardous conditions.
81
+

87
82
88
83
The AQI makes it easy to understand how outdoor air quality affects public health, particularly when pollutant levels reach unhealthy or hazardous thresholds.
89
84
@@ -222,7 +217,7 @@ uint32_t lastReadTime = 0;
222
217
NiclaSenseEnv device;
223
218
```
224
219
225
-
In the code snippet shown before:
220
+
In the code snippet shown above:
226
221
227
222
- The `Arduino_NiclaSenseEnv` library is included to provide access to the onboard sensors.
228
223
- The constant `READ_INTERVAL` defines the time between each sensor reading (10 seconds in this example).
@@ -253,7 +248,7 @@ void setup() {
253
248
}
254
249
```
255
250
256
-
In the code snippet shown before:
251
+
In the code snippet shown above:
257
252
258
253
- Serial communication is initialized at `115200` baud rate, allowing data to be sent to the IDE's Serial Monitor.
259
254
- The Nicla Sense Env board is initialized to read temperature, humidity and the outdoor Air Quality Index (AQI).
@@ -277,7 +272,7 @@ void loop() {
277
272
}
278
273
```
279
274
280
-
In the code snippet shown before:
275
+
In the code snippet shown above:
281
276
282
277
- The `loop()` function continuously checks if the time interval (10 seconds) has passed since the last reading.
283
278
- Once the interval is reached, the `displayAllData()` function is called to read sensor data.
@@ -335,7 +330,7 @@ The complete improved example sketch can be downloaded [here](assets/outdoor_air
335
330
336
331
## Improving the Simple Environmental Monitor Example Sketch
337
332
338
-
In the previous section, we explored setting up a simple environmental monitor using the Nicla Sense Env and the Portenta C33 boards. While the example sketch provided detailed readings on temperature, humidity and air quality, we can improve the example sketch by incorporating a visual indicator for the outdoor Air Quality Index (AQI).
333
+
In the previous section, we explored setting up a simple environmental monitor using the Nicla Sense Env and the Portenta C33 board. While the example sketch provided detailed readings on temperature, humidity and air quality, we can improve the example sketch by incorporating a visual indicator for the outdoor Air Quality Index (AQI).
339
334
340
335
In this section, we will improve the example sketch by adding control of the onboard RGB LED on the Nicla Sense Env board. The RGB LED will provide a visual representation of the outdoor AQI, changing colors based on its value.
0 commit comments