Programmable Timer Widget

So I’ve been using Blynk App to water my indoor plants using the timer widget and it works great, I love this app.

But I would like to be able to use the timer widget like a typical programmable timer. Giving the timer more options like to run weekly, or to choose the days of the week it runs, or to set multiple timed events within the same day. As it stands, I can only water my plant once every 24 hours…

If someone has a work around, then I’m happy to try that.

Add 9 more timers and then you can water your plants 10 times a day.

Or use RTC widget and schedule as much as you like.

Ok, I’ll have to do some research and probably have to learn to write some code, which I’m not good at.

I tried using multiple timer widgets, but it only lets me use the GPIO pin once…

RTC widget has no configurations in the app, so I’m guess that involves writing code…

I use Blynk very basically…

Can you give me an example of how to water multiple times a day or once a week?

Tie the timers to virtual pins (maximum 128 off for some devices) and then:

BLYNK_WRITE(V1) // Timer1
{
  int Timer1 = param.asInt(); 
    waterplants();
  }
  else{            
    stopwatering plants();
  } 
}

void waterplants(){
    // code here to turn on pump
}

void stopwatering plants(){
    // code here to turn off pump  
}

How is that going to control the GPIO pin connected to the relay that runs the pump.

Theres no mention of the pin I use for the relay?

Sorry man, Im so confused

It goes here:

// code here to turn on pump

and here:

// code here to turn off pump

So assuming your relay / pump is active HIGH (might be LOW) and it is connected to GPIO 4

digitalWrite(4, HIGH);

and

digitalWrite(4, LOW); // for OFF

Thanks Costas for showing me. I have a long way to go…I’m learning C++ programming on Lynda.com right now, so that this makes more sense. Im not even sure if thats the right language Arduino IDE uses lol