NODE-MCU Blinds control

good day, I’m doing a small application for controlling shutters. I would like to push the virtual button and to get the two blinds running the relay and after 20 seconds the relay is off.

Welcome to the Blynk Forum… you didn’t have any questions, so I am guessing you are looking for some assistance?

We don’t do custom coding here, but we will assist you in learning how to use Blynk to control your things.

I recommend you start with some of these links below… but also read through the Documentation and other Help Center pages and try out the examples in the Sketch Builder to get started learning Blynk.

And for all timing operations:

http://docs.blynk.cc/#blynk-firmware-blynktimer

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

//******************************************************


//******************************************************

const char AUTH [] = "";
const char SSID [] = "ASUS";
const char PASS [] = "";



//******************************************************


BLYNK_WRITE(V2){
  Serial.println("Blynk event started");
    
  int lamp = param.asInt();
  Serial.println("lamp = ");
  Serial.println(lamp);
  if (lamp == 1){
    
    digitalWrite(5, HIGH);
    delay(5000);
    digitalWrite(5, LOW);
  }
}


void setup ()
{
  digitalWrite(5, HIGH);
    delay(1000);
    digitalWrite(5, LOW);
    delay(1000);    
  Serial.println("Začátek připojení");
  Serial.begin(9600);
  Blynk.begin(AUTH, SSID, PASS, IPAddress(192,168,31,121));
  Serial.println("Připojeno");
  digitalWrite(5, HIGH);   
   
}
//******************************************************

void loop ()
{
    Blynk.run();
    digitalWrite(5, HIGH);
    delay(1000);
    digitalWrite(5, LOW);
    delay(1000);    
}
//*****************************************************

here is sample of my code. I have problem with light controll via virtual button. Similar code i have used for controlling LPD8806 digital leds and its working. Is there something wrong in my code?

Please paste the whole code here so we don’t have to bounce between web pages. Thanks.

PS your code is all messed up with too many delay() commands. Please read up on those links I already provided.

BLYNK_WRITE(V0){
Serial.println(“ON”);
digitalWrite(0, HIGH);
}

if i press V0, i get message in serial monitor, led is still off.

its working. problem was in ESP GPIO mapping for ESP8266.