Hello, I am new to programming and I have tried to connect an AM1008w sensor with an ESP8266, the problem is that when the sensor values are printed, it only gives 0, as shown below:
I would appreciate any help you could give me, since I have no idea if it is because the esp8266 cannot read the data or some other fault, the code I use is like this:
#include <am1008w_k_i2c.h>
AM1008W_K_I2C am1008w_k_i2c;
void setup() {
Serial.begin(9600);
am1008w_k_i2c.begin();
}
void loop(){
Serial.print("Co2 : ");
Serial.println(am1008w_k_i2c.get_co2());
Serial.print("VOC : ");
Serial.println(am1008w_k_i2c.get_voc());
Serial.print("Humidity : ");
Serial.println(am1008w_k_i2c.get_humidity());
Serial.print("Temperature : ");
Serial.println(am1008w_k_i2c.get_temperature());
Serial.println("GRIMM");
Serial.print("PM1.0 : ");
Serial.println(am1008w_k_i2c.get_pm1p0());
Serial.print("PM2.5 : ");
Serial.println(am1008w_k_i2c.get_pm2p5());
Serial.print("PM10 : ");
Serial.println(am1008w_k_i2c.get_pm10());
Serial.println("TSI");
Serial.print("VOC Now R / Ref. R (%) : ");
Serial.println(am1008w_k_i2c.get_voc_now_r_ref_r());
Serial.print("VOC Ref. R Value : ");
Serial.println(am1008w_k_i2c.get_voc_ref_r());
Serial.print("VOC Now R Value : ");
Serial.println(am1008w_k_i2c.get_voc_now_r());
Serial.println("");
delay(9000);
}
Thanks again for any help you can give me.