
7
Coding
To make sure everything is correctly wired, and the air quality sensor is working, download
the example code from our product page:
https://whadda.com/product/air-quality-sensor-combo-board-wpse342/
You can download the code from the Downloads section or copy paste the code here
below.
1. /*
2. @@@@@@@@@@@@@@@@@@@@@@
3. @@@@@@@@@@@@@@@@@@@@@@ @@@@ @@@ @@@@ @@@@ @@@@ @@@@@@@
@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@
4. @@@@@@@@@@@@@@@@@@@@@@ @@@@ @@@ @@@@ @@@@ @@@@ @@@@@@@@
@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@
5. @@@@@ @@@ @@@ @@@@@ @@@@ @@@ @@@@ @@@@ @@@@ @@@@ @
@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@
6. @@@@@ @@@@@ @@@@ @@@@ @@@@ @@@@@@@@@@@@ @@@@ @
@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@
7. @@@@@ @ @ @@@@@ @@@@ @@@@ @@@@ @@@@@@@@@@@@ @@@@@@@@
@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@@@@@@@@
8. @@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@@@@@
@@@ @@@@@@ @@@@@ @@@@@@@ @@@@ @@@@@@@@@@@
9. @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@ @@@@ @@@@ @
@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@@ @@@@
10. @@@@@@@@@@@@@@@@@@@@@@
11.
12. Whadda WPSE342 Air Quality combo board sensor:
13.
14. This air quality combo board senses the atmospheric-quality by using the popular
CCS811 and BME280 ICs. It provides a variety of environmental data including:
15. barometric pressure, humidity, temperature, TVOCs and equivalent CO2 (or eCO2) levels.
16. Communication is possible through the I²C protocol.
17.
18. The CCS811 is an exceedingly popular sensor, providing readings for equivalent CO2 (or
eCO2) in parts per million (PPM)
19. and total volatile organic compounds (TVOC) in the parts per billion (PPB).
20. The CCS811 also has a feature that allows it to fine-tune its readings if it has
access to the current humidity and temperature.
21.
22.
23. Pin Configuration Sensor board to arduino using I²C interface:
24. --------------------------------------------------------------
25.
26. WPSE342 | Arduino Uno
27.
28. 3V3 = 3V3 (VCC)
29. GND = GND (Ground)
30. SDA = UNO SDA (A4) / Mega SDA (44 - IDE 20)
31. SCL = UNO SCL (A5) / Mega SCL (43 - IDE 21)
32.
33. Required Libraries:
34. -------------------
35. SparkFunBME280.h
36. SparkFunCCS811.h