Using a compatible Intel-based platforms, this project lets you create an air quality monitor that:
- continuously monitors the air quality for airborne contaminants.
- sounds an audible warning when the air quality is unhealthful.
- stores a record of each time the air quality sensor detects contaminants, using cloud-based data storage.
For all the samples in this repository, see the for required boards and libraries. You need either Grove or DFRobot sensors but not both.
Sensor | Pin |
---|---|
Grove* Air Quality Sensor | AO |
Grove* Speaker | D5 |
Sensor | Pin |
---|---|
Buzzer | A1 |
Air Quality Sensor | A3 |
For more specific information on the hardware requirements see
- MRAA https://github.com/intel-iot-devkit/mraa) and UPM https://upm.mraa.io
- Intel® System Studio
- Microsoft Azure*, IBM Bluemix*, AT&T M2X*, AWS*, Predix*, or SAP* account (optional)
To configure the example for the specific hardware kit that you are using, either Grove* or DFRobot*:
- From the main menu, select Project > Properties dialog box is displayed.
- Expand the section C/C++ General.
Click on the Paths and Symbols sub-section, and click on the Symbols tab. - Now click on GNU C++, and click on the Add button.
- In the Name field, enter "INTEL_IOT_KIT". In the Value field, enter either "GROVEKIT" (this is the default) or "DFROBOTKIT", depending on which hardware kit you wish to use.
- Your new name symbol and value will now be displayed. Click OK.
- Another dialog box will appear asking to rebuild project. Click OK.
After running the program you should have output similar to:
Grove Air Quality Sensor
Heating sensor for 3 minutes…
Please wait, 1 minute(s) passed..
Please wait, 2 minute(s) passed..
Sensor ready!
raw: 77ppm: 0.95 Normal Indoor Air
raw: 40ppm: 01.15 Fresh Air
raw: 36ppm: 0.98 Fresh Air
To run the example with the optional back-end data store, you need to set the SERVER
and AUTH_TOKEN
environment variables. You can do this in Eclipse as follows:
-
From the Run menu, select Run Configurations.
The Run Configurations dialog box is displayed. -
Under C/C++ Remote Application, click doorbell.
This displays the information for the application. -
In the Commands to execute before application field, add the environment variables so it looks like this, except using the server and authentication token that correspond to your own setup:
chmod 755 /tmp/air-quality; export SERVER="http://intel-iot-example-data.azurewebsites.net/logger/air-quality"; export AUTH_TOKEN="Enter Auth Token Here"
IMPORTANT NOTICE: This software is sample software. It is not designed or intended for use in any medical, life-saving or life-sustaining systems, transportation systems, nuclear systems, or for any other mission-critical application in which the failure of the system could lead to critical injury or death. The software may not be fully tested and may contain bugs or errors; it may not be intended or suitable for commercial release. No regulatory approvals for the software have been obtained, and therefore software may not be certified for use in certain countries or environments.