[SOLVED] Can I use variable V pin in BLYNK_WRITE () function

I nave an idea to config esp via widget terminal to match virtual pins with gpio.

I wrote theese code, but I could’t achieve result:

Int VirtPin1 = 0;

BLYNK_WRITE (VirtPin1) // insteed of BLYNK_WRITE (V0)
{

}

but it doesn’t work.

I would like to have opportunity to change pins in function BLYNK_WRITE ()

Hello. We have BLYNK_WRITE_DEFAULT for that. Example - https://github.com/blynkkk/blynk-library/blob/master/examples/More/PrintAllVirtual/PrintAllVirtual.ino

1 Like