How works Time Input when day is selected?

Hello guys
I managed to understand how the Time Input Widget works to select hour, minute and second, both start and stop. But I don’t understand how to make that works depending on the selected days (Let’s say only Monday and Wednesday) How works Time Input Widget in that case? is it kind different?
Thanks in advance

Have you studied the examples?


Hello Pete.
Just a little, I was trying to understand how it works based on this code:

  TimeInputParam t(param);
  int Avvio1;
  unsigned int nowseconds = ((hour() * 3600) + (minute() * 60) + second());
  unsigned int startseconds = (t.getStartHour() * 3600) + (t.getStartMinute() * 60);
  unsigned int stopseconds = (t.getStopHour() * 3600) + (t.getStopMinute() * 60);
  int dayadjustment = -1;
  if (weekday() == 1) {
    dayadjustment = 6;
  if (t.isWeekdaySelected((weekday() + dayadjustment))) {
    //Schedule is ACTIVE today
    if (nowseconds >= startseconds - 31 && nowseconds <= startseconds + 31 ) {
      led1.on();  // turn on virtual LED
      Avvio1 = Avvio = 1;
     // Serial.println("Schedule 1 started");
    if (nowseconds >= stopseconds - 31 && nowseconds <= stopseconds + 31 ) {;   // turn OFF virtual LED
      Avvio = 0;
      //Serial.println("Schedule 1 finished");

But if I’m honest, I don’t know how implement that

Try studying this example:


1 Like

Fortunately I am not the only one who does not understand the time input :joy:
It could be the most useful tool but simultaneously it is also the most difficult widget to understand
If I find out how it works, I permise to tell you :wink:

The Time Input Widget is simply that… it takes your input settings, makes them available to your code and does nothing more :stuck_out_tongue:

It requires much logic code to make use of all those settings, more than other widgets, with exception of the rarely used Music Player Widget which is much the same… looks fancy but does nothing more than pass on which button is pressed :notes:

You’re right, it is very useful, but hard to learn how it works, and thanks man, if you find how works, I would be very grateful :smile:

Why Blynk did this Widget very hard to learn? That’s not fair

After think a lot, I finally got it to work as expected

Your guess is as good as mine :smiley: But I do feel that Blynk’s initial advertising of “no coding required” was pure marketing outgassing to bring in the unwashed masses :laughing:

If I am honest, that initial marketing was not bad, because without it, I wouldn’t be here learning about this :smile:

So true!.. I also responded the same way as I was looking for a simple GUI for Arduinos… but quickly learned how to code in order to do things the way I wanted.

Marketing doesn’t have to be honest to work :stuck_out_tongue: In fact, it seems to work best the other way around… go fig :wink:

Hey guys :v:
I´m back. Did someone found out how does the advanced time input work?
Beforehand: Yeah, I studied the examples but I came not on.
I only want be able to set in app a time and a day when an event starts…POINT
The rest is just finished. Now, after hours of searching I hope that someone help me on
Kind regards

Yes, I am sure many people have.

Have you tried searching this forum?