BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Blynk Time input setting

If i set the time in the app, it will not work must i do something in the sketch to let it work ?
"#define BLYNK_PRINT Serial
//#define SWITCH 3
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.

// Go to the Project Settings (nut icon).

char auth[] = “secret”;

// Your WiFi credentials.
// Set password to “” for open networks.
char ssid[] = “secret”;
char pass[] = “secret”;

// int LED = D1; // Define LED as an Integer (whole numbers) and pin D1 on Wemos D1 Mini Pro
const int buttonPin = D2; //Schakelaar aan pin D2 pinnen
const int LED = D1;
int buttonState = 0; // variable for reading the pin status

void setup()
{
// Debug console
Serial.begin(115200);
pinMode(buttonPin, INPUT); //Set the Button to (D2)
pinMode(LED, OUTPUT); //Set the LED (D1) as an output

digitalWrite(LED, buttonState);

// Blynk.begin(auth, ssid, pass);
//Blynk.begin(auth, ssid, pass, IPAddress(***), );
Blynk.begin(auth, ssid, pass, IPAddress(
), ***);

}

void loop()
{
Blynk.run();
}

// This function will be called every time button Widget
// in Blynk app writes values to the Virtual Pin V1

BLYNK_WRITE(V1) {
int pinValue = param.asInt(); // Assigning incoming value from pin V1 to a variable
if (pinValue == 1) {
digitalWrite(LED, HIGH); // Turn LED on.
} else {
digitalWrite(LED, LOW); // Turn LED off.

}
}
BLYNK_READ(V3) {
buttonState = digitalRead(buttonPin); // read input value
if (buttonState == HIGH) { // check if the input is HIGH (button released)
digitalWrite(LED, LOW); // turn LED OFF
} else {
digitalWrite(LED, HIGH); // turn LED ON

}

}
"

Yes, the Time Input Widget is just a user settings input tool, your code does all the comparing and calculation. Search this forum for more info … such as…

Also, good idea to read the Welcome Topic so you know how to properly post code here…