NODEMCU with CCS811
Posted: Tue Oct 23, 2018 9:39 am
Hello all,
I connected a nodemcu with a CCS811.
Yesterday when i tryed it for the fist time i did receive CO2, VOC and Temperatuur.
But when i recconect is i receive this:
This is the Arduino code
I really don't understand why its not working any more.
I have also tryed a ESP-32 with the same results
I connected a nodemcu with a CCS811.
Yesterday when i tryed it for the fist time i did receive CO2, VOC and Temperatuur.
But when i recconect is i receive this:
Code: Select all
⸮CCS811 test
Failed to start sensor! Please check your wiring.
Soft WDT reset
ctx: cont
sp: 3ffffda0 end: 3fffffd0 offset: 01b0
>>>stack>>>
3fffff50: 3ffee6f8 00000031 3ffee7b4 4020323c
3fffff60: 3ffee6f8 3ffee7b4 3ffee7b4 40203385
3fffff70: 3ffe88d8 3ffee784 3ffe850c 40203385
3fffff80: 3ffe887c 3ffee7f0 3ffee7b4 402033b0
3fffff90: 4020159e 00001388 3ffee7b4 402033d4
3fffffa0: feefeffe 3ffee7b4 00001388 402029f4
3fffffb0: 3fffdad0 00000000 3ffee7e8 402039c0
3fffffc0: feefeffe feefeffe 3ffe850c 401000e5
<<<stack<<<
H!⸮⸮⸮⸮D⸮
⸮
This is the Arduino code
Code: Select all
#include "Adafruit_CCS811.h"
Adafruit_CCS811 ccs;
void setup() {
Serial.begin(9600);
Serial.println("CCS811 test");
if(!ccs.begin()){
Serial.println("Failed to start sensor! Please check your wiring.");
while(1);
}
//calibrate temperature sensor
while(!ccs.available());
float temp = ccs.calculateTemperature();
ccs.setTempOffset(temp - 25.0);
}
void loop() {
if(ccs.available()){
float temp = ccs.calculateTemperature();
if(!ccs.readData()){
Serial.print("CO2: ");
Serial.print(ccs.geteCO2());
Serial.print("ppm, TVOC: ");
Serial.print(ccs.getTVOC());
Serial.print("ppb Temp:");
Serial.println(temp);
}
else{
Serial.println("ERROR!");
while(1);
}
}
delay(500);
}
I really don't understand why its not working any more.
I have also tryed a ESP-32 with the same results