Blynk.virtualwrite for the time input widget

Is it intended to be possible to use a blynk.virtualwrite command to update the start and stop time on the time input widget on the phone

e.g.

Blynk.virtualWrite(vPin ,startime,finishtime);

My use case is using just one time input widget on the phone to then go and programmatically in the device update a number of other time input widgets with the same start and stop time. Should save me updating them individually.

I’m using the above but there is no change in display on the phone for the other time input widgets.

If it is intended then I’ll play around some more. If not then I will do something else.

Not sure if I understood your question… The timeInput widget is a one way (EDIT, not quite :wink: see below) , one shot, input method to send a UI time to the device for further processing.

The other timer options might be more suitable if you want more flexibility with less coding…

and the Timer in Eventor

@koaiwi yes you can update the UI. Think you are missing the timezone.

  //seconds from the start of a day. 0 - min, 86399 - max
  int startAt = (60 + 20) * 60; //01:20
  //seconds from the start of a day. 0 - min, 86399 - max
  int stopAt = (60 + 21) * 60; //01:21
  //full list of supported timezones could be found here
  //https://www.mkyong.com/java/java-display-list-of-timezone-with-gmt/
  char tz[] = "Europe/Kiev";
  Blynk.virtualWrite(V2, startAt, stopAt, tz);

You need to ensure you have also set some days when you send the virtualWrite.

Opps, missed that example in the Docs:

Thanks guys. It works just fine. I think my initial problem was I was using float variables instead of integers. Not sure why I did that :slight_smile:

1 Like

A post was split to a new topic: I’m trying to update a stop time, based on a default duration