Check did day arrived or not everyday from TimeInput && weekday value 5 issue

• Hardware model ESP32 Dev
• Smartphone OS Android 12
• local server
• Blynk Library version 0.6.1 by Volodymyr

2 issues here refering to TimeInput Widget

  1. No idea how to make function will check every seconds/day to determine the day is arrived or not
  2. weekday() always return 5 no matter what day is today

Issue 1
Briefly, V10 are attached to time input widget with Start Time only and Weekdays enabled.
The story is “user will insert their own specific time and days to feed their pet”.

So the function(fx) should check every seconds to ensure that the set day is arrived or not/ sadly we cant called blynk_write fx like

timer.setInterval(1000L, FUNCTIONHERE)

. If I managed to move whole coding into void fx then there will be error with

TimeInputParam t(param);

since there is no input for t(param), any idea how to always check the day?

Issue 2
additionally my weekday() always displays the value 5 no matter what the day is. Based on other thread are not clearly describe the solution since the author just state use RTC widget then it solved. But not work for me.


  TimeInputParam t(param);

  // param[0] is the user time value selected in seconds.
  scheduleTimeM = param[0].asInt();  //already up to date
  // param[3] is the day of the week where 0=Sun .. 6=Sat
  scheduleDayM = param[3].asInt();  //need user click to update

  int currentDay = weekday();  //Do compare selected days with current day
  Serial.print("Today is day : ");
  Serial.println(currentDay);  //any day always 5...Fix this

  for (scheduleDayM = 1; scheduleDayM <= 7; scheduleDayM++) {
    if (t.isWeekdaySelected(scheduleDayM)) {
      Serial.println(String("Schedule day ") + scheduleDayM + " is selected");

      if (scheduleDayM == currentDay) {

A post was merged into an existing topic: Time Input Widget with Hours:Minutes and Days