Time input - can I use it to start servo rotation?

Hello,

I would like to use the time input widget to start and stop servo exactly day and time i want to.

How can i do this? I saw the example, but it is not clear for me as long as it is only used to print values.

I tried to do it this way, but as i expected it did not work.

 if (t.hasStartTime())
  {
    servo.write(0);
  }
  else
  {
    // Do nothing
  }

What I want exactly is: start servo at particular time and day.

Please help!

From the examples you may have seen if it states something like:

Serial.println("Device on");

simply change to:

Serial.println("Servo stopped");  // useful for debugging
servo.write(0);

I am not sure you understand.

I have continous servo. On the start time t.hasStartTime() i want it to run, and on the stop time t.hasStopTime i want it to stop, I also would like to have option for choosing the week days, but not sure if I need to change anything in the code?

BLYNK_WRITE(V10) {
  TimeInputParam t(param);

if (t.hasStartTime())
  {
    servo.write(0);
  }

  if (t.hasStopTime())
  {
    servo.write(90);
  }
  else
  {
   servo.write(90);
  }

    for (int i = 1; i <= 7; i++) {
    if (t.isWeekdaySelected(i)) {
    servo.write(0);
    }
  }

It doesn’t work, I just probably do not understand how Time input function work, is here someone who make it clear for me?

I don’t want to print anything, just want to use time input to do two simple commands on start and stop.

@thatguy93 the examples provided by Blynk for TimeInput are quite basic.

Take a look at the sketch in this post as it should have everything you need including the adjustment of Blynk weekdays to the Time library weekdays etc Timezone conversion for the Time Input widget

Modify for your requirements.