29 lastReadTime = millis();
58 void createPM1Channel() {
59 if (pm1channel ==
nullptr) {
62 pm1channel->setDefaultUnitAfterValue(
"μg/m³");
63 pm1channel->setInitialCaption(
"PM 1.0");
64 pm1channel->getChannel()->setDefaultIcon(8);
68 void createPM2_5Channel() {
69 if (pm2_5channel ==
nullptr) {
72 pm2_5channel->setDefaultUnitAfterValue(
"μg/m³");
73 pm2_5channel->setInitialCaption(
"PM 2.5");
74 pm2_5channel->getChannel()->setDefaultIcon(8);
78 void createPM4Channel() {
79 if (pm4channel ==
nullptr) {
82 pm4channel->setDefaultUnitAfterValue(
"μg/m³");
83 pm4channel->setInitialCaption(
"PM 4");
84 pm4channel->getChannel()->setDefaultIcon(8);
88 void createPM10Channel() {
89 if (pm10channel ==
nullptr) {
92 pm10channel->setDefaultUnitAfterValue(
"μg/m³");
93 pm10channel->setInitialCaption(
"PM 10");
94 pm10channel->getChannel()->setDefaultIcon(8);
99 uint32_t refreshIntervalMs = 600000;
100 uint32_t lastReadTime = 0;
102 double pm1value = NAN;
103 double pm2_5value = NAN;
104 double pm4value = NAN;
105 double pm10value = NAN;