Air Quality - CCS8811 sensor on Z-UNO V2

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
cadaval
Posts: 8
Joined: 24 Nov 2021 21:23

Air Quality - CCS8811 sensor on Z-UNO V2

Post by cadaval »

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
amatilda
Posts: 12
Joined: 26 Sep 2021 22:09

Re: Air Quality - CCS8811 sensor on Z-UNO V2

Post by amatilda »

Hello.
There are small changes, here is an option:

Code: Select all

#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.

void setup() {
	MY_SERIAL.begin(115200);
	if (ccs811.begin()) {
		MY_SERIAL.println("CCS811 found!");
		ccs811.setEnvironmentalData(50.0, 25.00);
	}
}

void loop() {
	if (!ccs811.readData()) {
		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);
}
cadaval
Posts: 8
Joined: 24 Nov 2021 21:23

Re: Air Quality - CCS8811 sensor on Z-UNO V2

Post by cadaval »

dear Amatilda

thanks a lot now compile :)

regards
CDV
cadaval
Posts: 8
Joined: 24 Nov 2021 21:23

Re: Air Quality - CCS8811 sensor on Z-UNO V2

Post by cadaval »

amaltilda

may be this is a stupid question, but i am new in z uno, i can not understand which pin i will connect the CCS8811 to Z-uno 2?

thanks
CDV
cadaval
Posts: 8
Joined: 24 Nov 2021 21:23

Re: Air Quality - CCS8811 sensor on Z-UNO V2

Post by cadaval »

people

anybody can tell me which pins i need use to connect CCS881 sensor to Z-UNO 2?

thanks a lot in a dvance
CDV
amatilda
Posts: 12
Joined: 26 Sep 2021 22:09

Re: Air Quality - CCS8811 sensor on Z-UNO V2

Post by amatilda »

VCC Power supply for the module can typically 3.3V is used - 3v zuno
GND Ground of the module, connected to ground of the circuit - GND zuno
SCL Serial Clock Line, used to provide clock pulse for I2C communication - SCL zuno
SDA Serial Data Address, used to transfer the data through I2C communication - SDA zuno
cadaval
Posts: 8
Joined: 24 Nov 2021 21:23

Re: Air Quality - CCS8811 sensor on Z-UNO V2

Post by cadaval »

thanks a lot for answer

i presume that you said the following.

ZUNO(digital pin 9) SCL
ZUNO(digital pin 10) SDA

regards
CDV
cadaval
Posts: 8
Joined: 24 Nov 2021 21:23

Re: Air Quality - CCS8811 sensor on Z-UNO V2

Post by cadaval »

dear People

finanlly i tried done my project with CCS811 air quality sensor with ZUNO V2, i connect the sensor to (pin 9) and (pin 10) SDA, #include <ZUNO_CCS811.h> library, but unfortunatly did not appear nothing on Serial. :(

so there is anybody, that at the momet are using this sensor CCS811 with ZUNO v2?

thanks
CDV
Post Reply