adjusted velues
This commit is contained in:
parent
6d5d05c869
commit
6cbdfb4f06
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
const int dry = 459; // value for dry sensor
|
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 dampPotty;
|
||||||
float onTimePotty;
|
float onTimePotty;
|
||||||
@ -21,6 +21,10 @@ void setup() {
|
|||||||
delay(10);
|
delay(10);
|
||||||
Serial.println("https://git.sfs.ddnss.org/Erik/garden-watering-controller.git");
|
Serial.println("https://git.sfs.ddnss.org/Erik/garden-watering-controller.git");
|
||||||
delay(100);
|
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(calculateTargetDampness() , 4);
|
||||||
Serial.println(calculatePumpOnTime() , 4);
|
Serial.println(calculatePumpOnTime() , 4);
|
||||||
Serial.println(calculateDampness(), 4);
|
Serial.println(calculateDampness(), 4);
|
||||||
pumpOffTime(30);
|
pumpOffTime(1);
|
||||||
wateringTheGarden();
|
wateringTheGarden();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +56,8 @@ float calculatePumpOnTime() {
|
|||||||
|
|
||||||
float calculateDampness() {
|
float calculateDampness() {
|
||||||
solDampness = analogRead(A0);
|
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;
|
return percentageHumididy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user