How to Control LED with virtual Pin

I am controlling my led with button widget and assigning digital option and pin D13 and working great i am turning on and off my led.

But i want to control my led with virtual pin how i will assign pin D13 to virtual pin ?


Reading the Documentation, Help Center files and checking the Sketch Builder examples (links at the top of this page) will answer many questions…

For example, this…

…and this…

…shows functions similar to this…

const int ledPin = 13;
// When App button, set to V2,  is pushed - switch the state, then translate that to a digitalWrite() command.
  ledState = param.asInt();
  digitalWrite(ledPin, ledState);