hi everyone, it was my first post in this forum
I want to make a small automatic plant watering system
And I don't want to use a Soil moisture Sensor
But, I use servo,delay to replace it and input the delay using ir remote
And Metro.h library sounds great for timing
Is there anyone who can help me to solve this ?
Thank you before
Hope these code can help u imagine what i was thinking
void input() {
 for (;;) {
  if (irrecv.decode(&results)) {
   switch (results.value) {
    case 0x2FD807F: // 1 (10)
     sdly += 1;
     Serial.println(sdly);
     break;
    case 0x2FD40BF: // 2
     sdly += 2;
     Serial.println(sdly);
     break;
    case 0x2FDC03F: // 3
     sdly += 3;
     Serial.println(sdly);
     break;
    case 0x2FD20DF: // 4
     sdly += 4;
     Serial.println(sdly);
     break;
    case 0x2FDA05F: // 5
     sdly += 5;
     Serial.println(sdly);
     break;
    case 0x2FD609F: // 6
     sdly += 6;
     Serial.println(sdly);
     break;
    case 0x2FDE01F: // 7
     sdly += 7;
     Serial.println(sdly);
     break;
    case 0x2FD10EF: // 8
     sdly += 8;
     Serial.println(sdly);
     break;
    case 0x2FD906F: // 9
     sdly += 9;
     Serial.println(sdly);
     break;
    case 0x2FD00FF: // 0
     sdly += 0;
     Serial.println(sdly);
     break;
    case 0x2fdd02f: // / Multiply dly by 3600000 / Hour
     dly = sdly.toInt();
     Serial.println("String = " + sdly);
     Serial.print("Delay = ");
     Serial.println(dly);
     Serial.print( "Hour = ");
     Serial.println(hour);
     hdly = dly * hour;
     Serial.println(hdly);
     break;
    case 0x2fd50af: // / Reset
     Serial.println("Reset");
     sdly = "";
     dly = 0;
     hdly = 0;
     break;
    case 0x2fd5aa5: // / Start Delay Mode
     Serial.println("Delay Start");
     fdelay();
     break;
    case 0x2fd6a95: // / Menu
     Serial.println("Back to Main Menu");
     menu();
     break;
   }
   irrecv.resume();
  }
 }
}
void fdelay() {
 for (;;) {
  if (detik.check()) {
   Serial.println("Check");
   Serial.println(hdly);
  }
  if (siram.check()) {
   Serial.println("Siram");
   myservo.write(180);
   delay(dstop);
   Serial.println("Stop");
   myservo.write(0);
  }
  if (irrecv.decode(&results)) {
   switch (results.value) {
    case 0x2fd6a95: // Back to MENU /
     Serial.println("Back to Menu");
     menu();
     break;
   }
   irrecv.resume();
  }
 }
}