Blinking Led

I need help with led blinking while it is on (app)and led off when off on blynk app application

Please provide your code

I think he wants someone to write his code :stuck_out_tongue_winking_eye:

This might work… well… the opposite way (Blinking LED when App disconnected)… I misinterpreted the OP question.

// Run if App disconnects
  // This dual nested timer routine will constantly blink the onboard LED of an ESP8266 Dev Board
  timer.setInterval(2000L, []() {  // Start 1st Timed Lambda Function - Turn ON LED every 2 seconds (repeating)
    timer.setTimeout(1000L, []() {  // Start 2nd Timed Lambda Function - Turn OFF LED 1 second later (once per loop)
      digitalWrite(2, HIGH); // Turn ESP On-Board LED OFF
    });  // END 2nd Timer Function
    digitalWrite(2, LOW); // Turn ESP On-Board LED ON
  });  // END 1st Timer Function

Perhaps try in the BLYNK_CONNECTED() function

Introduction - Blynk Documentation

Or use the same methods as reconnection routines and such with if() else() functions

void loop() {;

  if (Blynk.connected()) {  // If connected run as normal;
    LEDflashFlag == 1;
  } else {
    LEDflashFlag == 0;


And then make a non-blocking LED flashing routine that only runs when the flag = 1