Virtual pins help

I had to format your posted code for you… please use the proper method as described in the Welcome Topic.

Meanwhile, Sorry dude… I still don’t see how/why you want to turn on a virtual LED from a physical relay.

I don’t think you understand enough yet to ask the right questions… or the understand answers already given.

For example, even your existing Arduino commands are messed up… So far, when pressing the button widget, you are alternately trying to turn OFF pin 0 (which on an Arduino is Serial RX) and turn ON pin 255… (which does not exist on any Arduino) :stuck_out_tongue:

Read through the Arduino side reference on how to properly use a digitalWrite() commands as others.