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/03.elevator-monitoring-application-note/content.md
+19-7Lines changed: 19 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ software:
24
24
25
25
Air pollution is a threat that lurks even where we least expect it, from the comfort of our homes to our workplaces. Pollutants like CO₂ and volatile organic compounds (TVOC) silently threaten our health, representing a determining factor for our quality of life. This application note describes the building of an air quality monitor and occupancy machine vision tracker for indoor environments, in this case an elevator.
26
26
27
-

27
+

28
28
29
29
The monitoring system will measure the elevator's temperature, relative humidity, indoor air quality (IAQ), estimated CO₂ and total volatile organic compounds (TVOC) while counting the people inside the elevator. All this information will be forwarded to the Arduino Cloud for further visualization and tracking. The system will give a real-time visual feedback of the condition inside the elevator to warn people of harmful air quality.
30
30
@@ -279,10 +279,13 @@ if __name__ == "__main__":
279
279
green_led.on() if faces >0else green_led.off() # Turn on green LED when face is detected
280
280
281
281
if(faces >0):
282
+
i2c.init(I2C.PERIPHERAL, addr=0x35)
282
283
print("Faces detected:", faces)
283
284
buf[0] = faces
284
285
i2c.send(buf)
285
-
286
+
else:
287
+
i2c.deinit()
288
+
286
289
now = ticks_ms()
287
290
```
288
291
@@ -300,20 +303,29 @@ In the face detection process, some auxiliary functions are used to filter unwan
300
303
301
304
If you want to test the Nicla Vision example code **standalone** you must comment out the `i2c.send(buf)` line of the sketch, this is because it will show an error if it couldn't find the Portenta H7 on the I2C bus.
302
305
306
+
***For the Nicla Vision to run the sketch once is powered up you must put the code inside the `main.py` file in the file system.***
307
+
303
308
### Arduino Cloud Dashboard
304
309
305
-
### Complete Example Sketch
310
+
By leveraging the Arduino Cloud, we can seamlessly integrate a simple yet powerful dashboard to monitor and visualize the system status in real-time:
306
311
307
-
The complete improved example sketch can be downloaded [here]().
312
+

308
313
309
-
## Connecting the Environmental Monitor to Arduino Cloud
314
+
Within the Arduino Cloud's dashboard, the system variables can be monitored with the following widgets:
310
315
316
+
- System variable gauge showing relative humidity.
317
+
- Numeric state widgets to show IAQ, temperature, CO₂, ethanol and TVOC readings.
318
+
- Advanced charts showing historical record of CO₂, ethanol, temperature and humidity.
319
+
- People occupancy historical chart and current state.
311
320
312
-
### Arduino Cloud Dashboard
321
+
### Complete Project Sketch
313
322
314
-
The Arduino Cloud allows us to create a dashboard with professional real-time Human-Computer Interaction (HCI) elements, as seen in the following animation shows an active outdoor air quality monitor. **The animation has been sped up for illustrative purposes**.
323
+

315
324
325
+
The complete project sketches can be downloaded here:
0 commit comments