File tree Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,12 @@ void Adafruit_Sensor::printSensorDetails(void) {
70
70
case SENSOR_TYPE_NOX_INDEX:
71
71
Serial.print (F (" Nitrogen Oxides (Index)" ));
72
72
break ;
73
+ case SENSOR_TYPE_CO2:
74
+ Serial.print (F (" Carbon Dioxide (ppm)" ));
75
+ break ;
76
+ case SENSOR_TYPE_eCO2:
77
+ Serial.print (F (" Equivalent/estimated CO2 (ppm)" ));
78
+ break ;
73
79
}
74
80
75
81
Serial.println ();
Original file line number Diff line number Diff line change @@ -69,7 +69,9 @@ typedef enum {
69
69
SENSOR_TYPE_COLOR = (17 ),
70
70
SENSOR_TYPE_TVOC = (18 ),
71
71
SENSOR_TYPE_VOC_INDEX = (19 ),
72
- SENSOR_TYPE_NOX_INDEX = (20 )
72
+ SENSOR_TYPE_NOX_INDEX = (20 ),
73
+ SENSOR_TYPE_CO2 = (21 ),
74
+ SENSOR_TYPE_eCO2 = (22 ),
73
75
} sensors_type_t ;
74
76
75
77
/* * struct sensors_vec_s is used to return a vector in a common format. */
@@ -142,6 +144,9 @@ typedef struct {
142
144
normal (unitless) */
143
145
float nox_index; /* *< NOx (Nitrogen Oxides) index where 100 is normal
144
146
(unitless) */
147
+ float CO2; /* *< Measured CO2 in parts per million (ppm) */
148
+ float eCO2; /* *< equivalent/estimated CO2 in parts per million (ppm
149
+ estimated from some other measurement) */
145
150
sensors_color_t color; /* *< color in RGB component values */
146
151
}; // /< Union for the wide ranges of data we can carry
147
152
} sensors_event_t ;
Original file line number Diff line number Diff line change @@ -77,7 +77,9 @@ typedef enum
77
77
SENSOR_TYPE_COLOR = (17),
78
78
SENSOR_TYPE_TVOC = (18),
79
79
SENSOR_TYPE_VOC_INDEX = (19),
80
- SENSOR_TYPE_NOX_INDEX = (20)
80
+ SENSOR_TYPE_NOX_INDEX = (20),
81
+ SENSOR_TYPE_CO2 = (21),
82
+ SENSOR_TYPE_eCO2 = (22),
81
83
} sensors_type_t ;
82
84
```
83
85
@@ -143,6 +145,8 @@ typedef struct
143
145
float tvoc;
144
146
float voc_index;
145
147
float nox_index;
148
+ float CO2,
149
+ float eCO2,
146
150
sensors_color_t color;
147
151
};
148
152
} sensors_event_t ;
@@ -188,6 +192,8 @@ A key part of the abstraction layer is the standardisation of values on SI units
188
192
- ** tvoc** : values are in ** parts per billion** (ppb)
189
193
- ** voc_index** : values are an ** index** from 1-500 with 100 being normal
190
194
- ** nox_index** : values are an ** index** from 1-500 with 100 being normal
195
+ - ** CO2** : values are in ** parts per million*** (ppm)
196
+ - ** eCO2** : values are in ** parts per million*** (ppm)
191
197
192
198
193
199
## The Unified Driver Abstraction Layer in Practice ##
Original file line number Diff line number Diff line change 1
1
name =Adafruit Unified Sensor
2
- version =1.1.7
2
+ version =1.1.8
3
3
author =Adafruit <
[email protected] >
4
4
maintainer =Adafruit <
[email protected] >
5
5
sentence =Required for all Adafruit Unified Sensor based libraries.
You can’t perform that action at this time.
0 commit comments