Help with Virtual Pins

Sorry, but you still haven’t formatted your code properly for viewing on this forum… use the correct backtick keys

Blynk - FTFC

The directions on how was in the text you removed when posting this topic (fine to remove them… but please read first :stuck_out_tongue_winking_eye: )

Was also in the Welcome Topic that all new users should thoroughly read before posting…

As for your Virtual LED… just like real LEDs it can be ON, OFF or a variant in between.

When setting the value with a Blynk.virtualWrite() command you are akin to setting a PWM value with a range of 0-255. So HIGH = 1 = Low intensity (not OFF, but just barely ON… thus only the edge “lights” up).

Try this…

WidgetLED led3(V20);

Blynk.virtualWrite(V20, 255);  // Full intensity

Widget LEDs also have their own distinct commands, so led3.on(); will do the same full intensity thing as the command above

And finally, when using the distinct commands… presetting the intensity with a led3.setvalue(127); (in Setup or elsewhere in code) will turn ON a vLED, but at the mid-level intensity instead of the default full intensity.

1 Like