From 899d998dc77598b83fa02bb3359e48dbec92190f Mon Sep 17 00:00:00 2001 From: sieja Date: Sat, 6 Sep 2025 15:38:32 +0200 Subject: [PATCH] =?UTF-8?q?Korekta=20czas=C3=B3w=20i=20setupu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ESP32/PlantWaterer/PlantWaterer.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ESP32/PlantWaterer/PlantWaterer.ino b/ESP32/PlantWaterer/PlantWaterer.ino index 5ef2727..f2d911a 100644 --- a/ESP32/PlantWaterer/PlantWaterer.ino +++ b/ESP32/PlantWaterer/PlantWaterer.ino @@ -2,7 +2,7 @@ #include #include #include -#define Version "0.1" +#define Version "0.2" #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 32 #define OLED_RESET -1 @@ -24,13 +24,13 @@ int moisture = 0; int watertingCnt = 0; int minValue = 5000; int maxValue = 0; -int waitSec = 16; +int waitSec = 96; int waitMs = 1000 * waitSec; void setup() { pinMode(WTR_SENSOR, INPUT_PULLDOWN); pinMode(PIN_PUMP, OUTPUT); - digitalWrite(PIN_PUMP, LOW); + digitalWrite(PIN_PUMP, HIGH); Serial.begin(9600); if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) { Serial.println(F("SSD1306 allocation failed")); @@ -98,7 +98,7 @@ if (moisture < minValue){ Serial.println("Status: Soil is too dry - time to water!"); digitalWrite(PIN_PUMP, LOW); watertingCnt++; - delay(waitMs/4); + delay(waitMs/16); digitalWrite(PIN_PUMP, HIGH); } Serial.println();