Real button virtual button

Hi!!
I’am trying to do is to put a button on my wall to turn the light on, the idea is that when the button is pressed the arduino read as if was the BlynkWrite command (is it possible to understand?)

ex:

if (button pressed) {
BlynkWrite(1)
}

Yes, that is possible. You probably want to use an Interrupt to execute the code. As the physical button is pressed an interrupt is called and the code gets executed.

@jesio94 we have special example for that here and here.

We have also this example: https://github.com/blynkkk/blynk-library/blob/master/examples/More/SyncPhysicalButton/SyncPhysicalButton.ino
This synchronizes virtual and physical button behaviour (you can use both physical and virtual buttons to switch the same light)