i try to use Numeric Input Widget, and set it to V3 virtual pin, but the problem is i cant call the “menit” on void clock display, how to fix this ?
this is my code, hope u help me, thank you from indonesia, sorry for bad english.
BLYNK_WRITE(V3) //input from Numeric Widget
{
long menit = param[0].asLong();
}
void clockDisplay()
{
// You can call hour(), minute(), ... at any time
// Please see Time library examples for details
String currentTime = String(hour()) + ":" + minute() + ":" + second();
String currentDate = String(day()) + " " + month() + " " + year();
Serial.print("Current time: ");
Serial.print(currentTime);
Serial.print(" ");
Serial.print(currentDate);
Serial.println();
if(minute() == menit)
{
digitalWrite(LED_BUILTIN, HIGH);
}
else
{
digitalWrite(LED_BUILTIN, LOW);
}
// Send time to the App
Blynk.virtualWrite(V1, currentTime);
// Send date to the App
Blynk.virtualWrite(V2, currentDate);
}