Change QOS and Time polling sensors

This commit is contained in:
2020-08-07 14:57:44 +03:00
parent 7dcd044fb5
commit 2785c78704
7 changed files with 59 additions and 105 deletions

View File

@@ -100,7 +100,7 @@ void loop() {
rel_hum += (htu.readHumidity() - rel_hum) / 6.0f;
digitalWrite(PWR_SENS, LOW);
}
if(++measCnt == 9){
if(++measCnt == 29){
digitalWrite(PWR_SENS, HIGH);
measCnt = 0;
}
@@ -146,8 +146,8 @@ void publishMin()
dtostrf(rel_hum, 6, 1, strFVal);
client.publish("/home/smallroom/rel_hum", strFVal);
}
itoa(cRun, strFVal, 10);
client.publish("/home/smallroom/millis", strFVal);
// itoa(cRun, strFVal, 10);
// client.publish("/home/smallroom/millis", strFVal);
//digitalWrite(LED_BLUE, LOW);
}
}