I working on water irrigation system.
I need help with and get a function
I will have the opportunity too push a button. So systeam is ignore the clock
if((H == 15) && (M == 42) && (S == 01)){
while(moistureSensorValue >= 700){
and water the plent if it dry.
Here is the code snip:
// if the soil is dry and if it is the right time: turn on the pump for 1 minute
if((H == 15) && (M == 42) && (S == 01)){
while(moistureSensorValue >= 700){
//hvis det er tørrt og klokka er 3.42.01 så kjøres den her
// system messages
// lcd.clear();
lcd.setCursor(0,1);
RightHour();
lcd.setCursor(0,2);
lcd.print(string_table[8]);
lcd.setCursor(0,3);
lcd.print(string_table[5]);
lcd.setCursor(0,2);
lcd.write((uint8_t)5);
// turn the pump on
digitalWrite(pumpPin,HIGH);
digitalWrite(pumpLEDPin,HIGH);
delay(10000);
// if the soil is not moist so far
// reads the moisture sensor once more
moistureSensorValue = analogRead(moistureSensorPin);
}
// turn the pump off
digitalWrite(pumpPin,LOW);
digitalWrite(pumpLEDPin,LOW);
}
You need too look on the full code?