Time Input Widget read problem

All documented in the Welcome Topic… and just about every 3rd post in this forum :stuck_out_tongue:

No, you made a few more changes :stuck_out_tongue_winking_eye:

Two compile errors in your code… first is at the very top just a single forward slash /**** is needed, not a //****

Second compile error is because you added this line in your void setup()

  Serial.println(String("Start: ") + t.getStartHour();

Because the TimeInputParam t(param) gets provided only within the BLYNK_WRITE(V12) function, when sent by the widget.

As I suggested :wink: check out that whole topic about using this widget. One way (probably not the only way) I utilised the time parameters throughout my code was to declare separate global variables and assign them from the param call.

int SThour;
int STmin;
int STsec;
int SPhour;
int SPmin;
int SPsec;

BLYNK_WRITE(V1) {  // Called whenver setting Time Input Widget
  TimeInputParam t(param);
  SThour = t.getStartHour();
  STmin = t.getStartMinute();
  STsec = t.getStartSecond();
  SPhour = t.getStopHour();
  SPmin = t.getStopMinute();
  SPsec = t.getStopSecond();
}
1 Like