Hello Mark,
Thanks a lot for your reply, indeed I started from simple answers, should have specified that.
I2C Scanner gives the CCS811 at the expected address:
I2C device found at address 0x5B !
The basic readings example gives the following output for hours and hours, not real output as far as I know.
20:08:20.533 → CO2[400] tVOC[0] millis[1049752]
That is why I extended the code, first by adding the environmental data from the DHT11, then by selecting different drive modes, and finally by adding the error handling from other examples.
For now I extended the BasicReadingsExample as follows:
void loop()
{
if (mySensor.checkForStatusError())
{
//If the CCS811 found an internal error, print it.
printSensorError();
}
//Check to see if data is ready with .dataAvailable()
if (mySensor.dataAvailable())
{
//If so, have the sensor read and calculate the results.
//Get them later
mySensor.readAlgorithmResults();
Serial.print(“CO2[”);
//Returns calculated CO2 reading
Serial.print(mySensor.getCO2());
Serial.print(“] tVOC[”);
//Returns calculated TVOC reading
Serial.print(mySensor.getTVOC());
Serial.print(“] millis[”);
//Simply the time since program start
Serial.print(millis());
Serial.print(“]”);
Serial.println();
}
delay(10); //Don’t spam the I2C bus
}
This results in the following output:
20:15:49.923 → Error: HeaterFault
20:15:49.923 → Error: HeaterFault
20:15:49.957 → Error: HeaterFault
20:15:49.991 → Error: HeaterFault
20:15:49.991 → Error: HeaterFaultMaxResistance
20:15:50.024 → CO2[400] tVOC[0] millis[7036]
20:15:50.058 → Error: HeaterFault
let me know your thoughts.
Greetings,
Lieven