Update main logic flow and fix bug that did not let MCU sleep

This commit is contained in:
2025-05-03 12:08:08 +02:00
committed by erickahmed
parent 5f1675f879
commit 637fff92ae
+7 -4
View File
@@ -30,10 +30,13 @@ void setup(void) {
}
void loop(void) {
triggerSensorRead();
int16_t result = readMoisture();
if (result != -1) {
if (readSensors) {
int16_t result = readMoisture();
if (result != -1) {
Serial.println(result);
readSensors = false;
}
}
enterSleep();
}