Blynk how to virtualize all pins

i all ! i want to virtualize all pins digital on wemos d1 mini , for create conditional condition with eventor. i search but i don’t understand well how it work ! anybody can help me ?
i want to use virtual pin for input with eventor …

i want to associate for example v1 pin with D1 pin of wemos
V2 pin associate ton D2 pin of wemos
ect…
anybody can show me this in example please?
tank you !

I don’t understand where Eventor fits in to this.
There are plenty of good examples of how to use virtual pins when coding boards like the D1 Mini, but when you do that then Eventor becomes redundant.

Pete.

then I would like to associate the pin D1 of the wemos to V1, D2 to V2 and so on.
how can i do this?

the goal of all this is to associate the pin d1 to virtual 1 to decide to send a notification when d1 is low for example

BLYNK_WRITE(V1)
{
  int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
  if (pinValue == 1)
  {  
    digitalWrite( 5, HIGH); // D1 is GPIO5
  }
else
  {
   digitalWrite( 5, LOW); // D1 is GPIO5
   Blynk.notify("D1 is LOW");
  }
}

just to be sure i write this in setup and not loop is that right?

You don’t need to use virtual pins to achieve this.
This sketch builder example does what you’ve described, except that it uses GPIO2 (the pin labelled D4) as opposed to GPIO5 (pin D1)

Pete.

I think you do not understand what I want to do I want the pin d1 to be associated with v1 to be able to decide on an event to wish with eventor. for example I want that when d1 is low that the virtual pin v1 indicates low (1 or 0) also to be able to send for example an email that the pin v1 is low

Maybe if you better explained what you are doing, we may be able to provide better help. For example, what is connected to D1, a sensor, switch, etc.?

is a switch

So you would want to use either an interrupt or a timer to detect when the switch opens or closes, and then use Blynk.virtualWrite(Vpin, value); to manipulate the state of the virtual pin.

i want the state of v1 to follow the state of d1. if i press the button and d1 becomes low i want v1 to become (0 or 1 depending on the state) in order to be able to send a notification through eventor. I absolutely want to go through eventor because these pin options can change later, this requires describing a condition code and restart uploading to the card if I want the condition to change

yes

I think you’re trying to use the wrong tool for the job.
Eventor is not the tool of choice for doing this comparison, C++ code running on the device is a better tool.

Pete.

int btnState = HIGH;

void checkPhysicalButton()
{
  if (digitalRead(5) == LOW) //D1 is GPIO5
 {
    // btnState is used to avoid multiple sends
    if (btnState != LOW) 
      {
        // Update virtual pin
        Blynk.virtualWrite(V2, LOW);
      }
    btnState = LOW;
  } 
  else if (btnState != HIGH) 
   {
       // Update virtual pin
        Blynk.virtualWrite(V2, LOW);
       btnState = HIGH;
   }  
}

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
  
  pinMode(5, INPUT_PULLUP);

  // Setup a function to be called every 100 ms
  timer.setInterval(100L, checkPhysicalButton);
}

however when we have a value to read we transfer it to a virtual pin it is the same principle that I want to do except with a low or high input, how I should write it in this case.

if not how and where I should write the transfer of a pin value so that it is transferred to a virtual pin

You use the Blynk.virtualWrite(Vpin, value) command.

See the Sketch Builder for examples.

Pete.

tank you Toro_Blanco for your help is work fine

 void checkPhysicalButtond0()
{
  if (digitalRead(16) == LOW) //D1 is GPIO5
    {
      Blynk.virtualWrite(V0, LOW);
    }
    else 
   {
    Blynk.virtualWrite(V0, HIGH);
   }
}
  void checkPhysicalButtond1()
{
  if (digitalRead(5) == LOW) //D1 is GPIO5
    {
      Blynk.virtualWrite(V1, LOW);
    }
    else 
   {
    Blynk.virtualWrite(V1, HIGH);
   }
}
  void checkPhysicalButtond2()
{
  if (digitalRead(4) == LOW) //D1 is GPIO5
    {
      Blynk.virtualWrite(V2, LOW);
    }
    else 
   {
    Blynk.virtualWrite(V2, HIGH);
   }
}
  void checkPhysicalButtond3()
{
  if (digitalRead(0) == LOW) //D1 is GPIO5
    {
      Blynk.virtualWrite(V3, LOW);
    }
    else 
   {
    Blynk.virtualWrite(V3, HIGH);
   }
}
  void checkPhysicalButtond4()
{
  if (digitalRead(2) == LOW) //D1 is GPIO5
    {
      Blynk.virtualWrite(V4, LOW);
    }
    else 
   {
    Blynk.virtualWrite(V4, HIGH);
   }
}
  void checkPhysicalButtond5()
{
  if (digitalRead(14) == LOW) //D1 is GPIO5
    {
      Blynk.virtualWrite(V5, LOW);
    }
    else 
   {
    Blynk.virtualWrite(V5, HIGH);
   }
}
  void checkPhysicalButtond6()
{
  if (digitalRead(12) == LOW) //D1 is GPIO5
    {
      Blynk.virtualWrite(V6, LOW);
    }
    else 
   {
    Blynk.virtualWrite(V6, HIGH);
   }
}
  void checkPhysicalButtond7()
{
  if (digitalRead(13) == LOW) //D1 is GPIO5
    {
      Blynk.virtualWrite(V7, LOW);
    }
    else 
   {
    Blynk.virtualWrite(V7, HIGH);
   }
}
  void checkPhysicalButtond8()
{
  if (digitalRead(15) == LOW) //D1 is GPIO5
    {
      Blynk.virtualWrite(V8, LOW);
    }
    else 
   {
    Blynk.virtualWrite(V8, HIGH);
   }
}

void saveConfigCallback () {
  Serial.println("Should save config");
  shouldSaveConfig = true;
}
void setup() {
  
     timer.setInterval(1000L, readAndSendData);

     {

  
  pinMode(16, INPUT_PULLUP);

  // Setup a function to be called every 100 ms
  timer.setInterval(100L, checkPhysicalButtond0);
}
     {

  
  pinMode(5, INPUT_PULLUP);

  // Setup a function to be called every 100 ms
  timer.setInterval(100L, checkPhysicalButtond1);
}

     {

  
  pinMode(4, INPUT_PULLUP);

  // Setup a function to be called every 100 ms
  timer.setInterval(100L, checkPhysicalButtond2);
}
     {

  
  pinMode(0, INPUT_PULLUP);

  // Setup a function to be called every 100 ms
  timer.setInterval(100L, checkPhysicalButtond3);
}
     {

  
  pinMode(2, INPUT_PULLUP);

  // Setup a function to be called every 100 ms
  timer.setInterval(100L, checkPhysicalButtond4);
}
     {

  
  pinMode(14, INPUT_PULLUP);

  // Setup a function to be called every 100 ms
  timer.setInterval(100L, checkPhysicalButtond5);
}
     {

  
  pinMode(12, INPUT_PULLUP);

  // Setup a function to be called every 100 ms
  timer.setInterval(100L, checkPhysicalButtond6);
}
     {

  
  pinMode(13, INPUT_PULLUP);

  // Setup a function to be called every 100 ms
  timer.setInterval(100L, checkPhysicalButtond7);
}
     {

  
  pinMode(15, INPUT_PULLUP);

  // Setup a function to be called every 100 ms
  timer.setInterval(100L, checkPhysicalButtond8);
}

@Greenly_Solutiones please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.