I have added a Wemos D1 mini to the remote of my window blinds to make it an IOT device. It works with hard coded code and new I want to do the same via Blynk.
The problem is that when I push the button (D1), then the D1 output has to stay high for 2 seconds for it to work.
I have added this code, but without any success
BLYNK_WRITE(V5)
{
int pinData = param.asInt();
if (pinData == D1)
{
digitalWrite(D1, HIGH);
delay(2000);
digitalWrite(D1, LOW);
}
}