ExtSens Sleep

This commit is contained in:
2020-11-08 15:41:08 +03:00
parent a75143cdd8
commit 23ccecb0b7
2 changed files with 34 additions and 18 deletions

View File

@@ -40,7 +40,7 @@ void setup() {
void loop() {
float temp, hum;
if((cRun + 29999) < millis()){
//if((cRun + 29999) < millis()){
cRun = millis();
temp = myAHT10.readTemperature(AHT10_FORCE_READ_DATA);
hum = myAHT10.readHumidity(AHT10_USE_READ_DATA);
@@ -56,7 +56,8 @@ void loop() {
batteryPcnt = (v * 100) / 4.2;
sendBatteryLevel(batteryPcnt);
send(msgVolts.set(v, 2));
}
//}
sleep(60000 - (millis() - cRun));
}
void presentation()