Correct use of Time Input Widget?

Hi, I’ve got a sketch that has been running well, and want to add the Time Input Widget to it to get daily Max/Min temperature values sent to the SuperChart widget at midnight each day. Am I using the Time Widget correctly?


// Read Time Input set time for resetting Max/Min temp values //////////////////////////
BLYNK_WRITE(V32) {  // V32 is the Time widget
  TimeInputParam t(param);

  // Process start time
  if(t.hasStartTime())  { // Time Widget set to 00:00
//    if timer == midnight send Max/Min values to SuperChart, then reset values for next day
    Blynk.virtualWrite(V30, maxRoofTemp);  // V30 is Superchart data stream 1
    Blynk.virtualWrite(V31, minRoofTemp);  // V31 is Superchart data stream 2
    maxRoofTemp = 0; //reset maxRoofTemp
    minRoofTemp = 50; //reset minRoofTemp
  }
}

Absolutely… NOT :smile:
The time INPUT widget is just for what it’s name says: for input the time and pass that to hardware as a parameter. It cannot be used as a timer DIRECTLY. For that purpose it needs to “cooperate” with RTC (either as a hardware module, or a RTC widget, which I do recommend) and a code support. But instead of this you can use Timer widget for that purpose, or an eventor.

@marvin7 Thanks very much. I appreciate the guidance.

Regard,
Brian

@marvin7 - I’ve got it working correctly with the Timer widget. Thanks again

My pleasure! :wink: Keep going