How to use value of a virtual pin in other BLYNK_WRITE() Functions

How to use value of a vitual pin in others BLYNK_WRITE

Example code

  int value = param.asInt();
  int value1 = param.asInt();
  if (value1 == 1 || value == 1) {    // i want to get value of V0 to use here
      digitalWrite(16, HIGH);

FYI, A basic Arduino code question… not Blynk specific.

By using global variables instead of local ones as you have.

Thanks. It worked. I thinked BLINK_WRITE is function and tried to return the value.

They are still called functions :slight_smile: but they are specifically meant as a conduit with the corresponding widget/purpose in the App.

You can’t call them directly in code like void() functions, but you can “call” them in code via sync commands…