Need help whit my project "Time imput" widget

I don’t understand how the “Time Input” widget works. I want to turn a virtual pin on and off using the time input widget with startTime and stopTime values. I want that when the startTime is >= the current time the D7 pin of my NodeMcu activates(3.3v) and that when the stopTime is <= the current time the D7 pin deactivates(0v).

[Unformatted code removed by moderator]

please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly. Triple backticks look like this: ``` is missing in the void loop

Hi @LeandroIrigaray

I just ran your code and it works.
Couple of things:

  • You do not need #include DHT.h or SPI.h, at least for this sketch to work
  • You don’t need the timer or the light, either.
  • You are using quote marks that the Arduino IDE is not recognizing. It might be the way you entered your code into the Community, so use these quote marks instead
    #define BLYNK_FIRMWARE_VERSION "1.2.0"

I compiled this and your code works (with the tiny changes to the quote marks),using my TEMPLATE_ID, TEMPLATE_NAME, and AUTH_TOKEN.

I assume your code compiles and connects to Blynk.

You should look in the Blynk.Console (at at your Indoor Template to see if you have the V7 Datastream configured correctly. Then make sure the Blynk App has the TimeInput widget connected to that same V7 Datastream.

In your Blynk Console, in your Indoor Template, you must have Virtual Pin Datastream V7 specified as a String.

Then, in your app, the TimeInput widget must be attached to Datastream V7 (using the little wrench to edit the widget).

Also, in the app, while editing the TimeInput widget, check the little slide switches in the app when editing to make sure you CAN select start/stop input, day-of-week, etc.

Your code works!. Keep at it.