I’ve seen the below example and trying to work out how I can adjust a time. Im trying to set one time input to the current time and then another to the current time + X amount of minutes which will also adjust the hour.
I’m trying to avoid strings, im at 90% storage space used and don’t want to start causing stability issues
//seconds from the start of a day. 0 - min, 86399 - max
int startAt = 5 * 60; //00:05
Blynk.virtualWrite(V1, startAt);
Posting minimal information and snippets of code do nothing to allow community members to understand the context of the questions you’re asking.
If people don’t understand the question then the either won’t answer, or give a worthless answer.
Tyring to achieve:
time widget to display current time when a function is called
2nd time widget to display current time + a variable amount of minutes, for example time to show what the time will be in 150 minutes time (150 being the variable given)
Blynk doesn’t have a “time widget”
There is a Time Input widget available on the mobile dashboard, but it’s not used to display the current time, it’s used to input start (and optionally stop times) along with optional timezone adjustments.
I’m going to stop responding to any more of your posts until you start providing far more detail about your hardware, software and intended outcomes, as described in the link I provided.
Not sure what info on hardware/software would have been helpful, but either way thanks for the response. Maybe I was misunderstanding the examples of the time widget, as the examples show you can set the start time in code but had to be an amount of seconds since midnight, I was hoping there might have been a different way to give the widget the actual time
No, that’s how the widget works, to make UNIX time calculations simple.
But, it makes your task easier. 150 mins x 60 = 9000 secs. Add to start time. If the result is > 86,400 then deduct 86,400
ah ok, so from what I can find Blynk RTC doesnt give you seconds from midnight outright but i’ve just seen another forum post which makes sense. I assume you mean something like this:
Time = (3600*hour()) + (60* minute());
This then gives me the seconds so I can add on my required seconds to the time?