diff --git a/src/arduinoNano/arduinoNano.ino b/src/arduinoNano/arduinoNano.ino index 9b0be2c..ed491c2 100644 --- a/src/arduinoNano/arduinoNano.ino +++ b/src/arduinoNano/arduinoNano.ino @@ -2,7 +2,7 @@ const int dry = 459; // value for dry sensor -const int wet = 214; // value for wet sensor +const int wet = 207; // value for wet sensor float dampPotty; float onTimePotty; @@ -21,6 +21,10 @@ void setup() { delay(10); Serial.println("https://git.sfs.ddnss.org/Erik/garden-watering-controller.git"); delay(100); + Serial.print("Soll foichtigkeit: "); + Serial.println(calculateTargetDampness(), 4); + Serial.print("Ist feuchtigkeit: "); + Serial.println(calculateDampness(),4 ); } @@ -36,7 +40,7 @@ void loop() { Serial.println(calculateTargetDampness() , 4); Serial.println(calculatePumpOnTime() , 4); Serial.println(calculateDampness(), 4); - pumpOffTime(30); + pumpOffTime(1); wateringTheGarden(); } @@ -52,7 +56,8 @@ float calculatePumpOnTime() { float calculateDampness() { solDampness = analogRead(A0); - float percentageHumididy = map(solDampness, wet, dry, 100, 0)/100; + float percentageHumididy = (map(solDampness, wet, dry, 100, 0)); + percentageHumididy = percentageHumididy *0.01; return percentageHumididy; }