Implement plant watering based on current moisture levels

This commit is contained in:
2025-10-29 14:45:22 +01:00
parent 620eb57920
commit 2be65a0b76
+2 -4
View File
@@ -45,12 +45,10 @@ int main(void) {
pLastMoistureVal = &lastMoistureVal;
while(true) {
*pLastMoistureVal = moistureRead();
// nested if: (result outside range (see config.h)) {waterPlant()}
if ((*pLastMoistureVal = moistureRead()) < MOISTURE_MIN) waterPlant();
twiRespond();
enterSleep();
}
return -1;
}