Help for virtual led RESOLVED

I would like to help, someone could take a simple example on how to use the virtual LEDs, I tried many combinations but do not get results.
I tested the sketch of the documentation, but I do not understand how to change the example
for example, activating a digital pin and activates the virtual LED
thanks

Have ypu checked this example?

I tested it and it works but I could not use this reference to create the new sketch

Could you please be more specific? What is the reason? What hardware? What is your code?

This sketch works, if I press the button the virtual LED activates, but then reboot the connection

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxx";

WidgetLED led1(1);


SimpleTimer timer;

void setup()
{
  Serial.begin(9600); // See the connection status in Serial Monitor
   Blynk.begin(auth, "ssid", "password");

  while (Blynk.connect() == false) {
    // Wait until connected
  }

  timer.setInterval(2000L, ButtonPress);

// Setup notification button on pin 13
  // Attach pin 13 interrupt 
  attachInterrupt(13, ButtonPress, FALLING);
}

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

void ButtonPress()
{
  
  int isButtonPressed = digitalRead(13);
  if (isButtonPressed) {
    led1.on();
    BLYNK_LOG("LED1: on");
  }
   else {
    led1.off();
   BLYNK_LOG("LED1: off");
  }
}

I resolved not using interrupts
I also posted solution on instructable
[esp8266-12 standalone button virtualled][1]
[1]: http://www.instructables.com/id/ESP8266-12-blynk-wireless-simple-virtual-led/

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>


// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxx"; //insert here your token generated by Blynk


WidgetLED led1(1); //virtual led 

void setup()
{
  Serial.begin(9600); // See the connection status in Serial Monitor
  Blynk.begin(auth, "ssid", "password!"); //insert here your SSID and password

  while (Blynk.connect() == false) {
    // Wait until connected
  }

 pinMode(13, INPUT); // gpio 13 input button 
}


void loop()
{
  Blynk.run();

//----------------button virtual led---------------
  
  byte inp = digitalRead(13);
   
  if (inp == HIGH)
  {
   led1.on();
  }
   else
   led1.off();
 }

how can I control a relay instead of a virtual led and push the boton and change state of relay, then push again and return it back?

thanks!

Digital pins can be controlled directly by the app. No code is needed. Just add the button and set it to the pin, where relay is connected

Also, please do not hijack other’s threads. If you have a question create a new topic

I meant control a relay whith a physical button and the button in the app.