#define SENSOR_THRESHOLD_CO2 (650)
#define SENSOR_GATHER_INTERVAL (0.05f)
-#define SENSOR_GATHER_COUNT (5)
+#define SENSOR_GATHER_COUNT (60)
//#define USE_ST_SDK
unsigned int avg = 0;
avg = sum/SENSOR_GATHER_COUNT;
- _D("co2 avg value - %u", avg);
- _D("co2 avg voltage - %.2lfv", co2_sensor_value_to_voltage(avg));
+ _D("co2 avg - [%u], [%u ppm]", avg, co2_sensor_value_to_ppm(avg));
sensor_data_set_uint(ad->co2_data, avg);