Air Quality - CCS8811 sensor on Z-UNO V2
Posted: 25 Nov 2021 12:44
Hi people
i am new z-uno v2 user, and i'm try included on my Z-wave home, this sensor CCS811, but unfortunatly when i compile the code, i have the folowing error
...
exit status 10
'CCS811_Environment' does not name a type
...
this is the code.
....
#define MY_SERIAL Serial0
#include <ZUNO_CCS811.h>
ZUNO_CCS811 ccs811;
// For precise values you need external temperature/humidity sensor like DHT. Here for example 50.0% humidity and 25.00 C are assumed.
CCS811_Environment env_data = {500, 2500};
void setup() {
MY_SERIAL.begin(115200);
if (ccs811.begin()) {
MY_SERIAL.println("CCS811 found!");
ccs811.setEnvironmentalData(&env_data);
}
}
void loop() {
if (ccs811.readData() & CCS811_STATUS_DATAREADY) {
MY_SERIAL.print("CO2: ");
MY_SERIAL.print(ccs811.geteCO2());
MY_SERIAL.println(" ppm");
MY_SERIAL.print("VOC: ");
MY_SERIAL.print(ccs811.getTVOC());
MY_SERIAL.println(" ppb");
}
delay(5000);
}
...
anybody can help me please!!
thanks
CDV
i am new z-uno v2 user, and i'm try included on my Z-wave home, this sensor CCS811, but unfortunatly when i compile the code, i have the folowing error
...
exit status 10
'CCS811_Environment' does not name a type
...
this is the code.
....
#define MY_SERIAL Serial0
#include <ZUNO_CCS811.h>
ZUNO_CCS811 ccs811;
// For precise values you need external temperature/humidity sensor like DHT. Here for example 50.0% humidity and 25.00 C are assumed.
CCS811_Environment env_data = {500, 2500};
void setup() {
MY_SERIAL.begin(115200);
if (ccs811.begin()) {
MY_SERIAL.println("CCS811 found!");
ccs811.setEnvironmentalData(&env_data);
}
}
void loop() {
if (ccs811.readData() & CCS811_STATUS_DATAREADY) {
MY_SERIAL.print("CO2: ");
MY_SERIAL.print(ccs811.geteCO2());
MY_SERIAL.println(" ppm");
MY_SERIAL.print("VOC: ");
MY_SERIAL.print(ccs811.getTVOC());
MY_SERIAL.println(" ppb");
}
delay(5000);
}
...
anybody can help me please!!
thanks
CDV