Skip to content

Commit 8a801ba

Browse files
committed
gif rgb added
1 parent 9acb141 commit 8a801ba

File tree

2 files changed

+3
-1
lines changed
  • content/hardware/06.nicla/boards/nicla-sense-env/tutorials/environmental-monitor-application-note

2 files changed

+3
-1
lines changed
Loading

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ In the previous section, we explored setting up a simple environmental monitor u
334334

335335
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.
336336

337+
![Example working principle overview](assets/rgb-aqi.gif)
338+
337339
The complete example sketch is shown below. The RGB LED will change color based on the following:
338340

339341
- Green 🟢 for **good air quality**.
@@ -445,7 +447,7 @@ void displayAllData() {
445447
// Good air quality: Green LED
446448
rgbLED.setColor(0, 255, 0);
447449
rgbLED.setBrightness(255);
448-
} else if (airQualityIndex <= 100) {
450+
} else if (airQualityIndex <= 150) {
449451
// Moderate air quality: Yellow LED
450452
rgbLED.setColor(255, 255, 0);
451453
rgbLED.setBrightness(255);

0 commit comments

Comments
 (0)