Turn On / Off multi Virtual Leds

Instead of the dedicated WidgetLED commands, I use this generic vPin type of processing for my multi-virtual LED projects

Blynk.virtualWrite(i, 255); // Set LED to full intensity

For example, to turn all 72 of them “simulated off”, AKA all black… True off would be setting them to 0 for the value.

for (int i = 0; i <= 71; i++) {
    Blynk.setProperty(i, "label", " ");  // Set LED Label to blank
    Blynk.setProperty(i, "color", "#000000");  // Set LED colour to black
    Blynk.virtualWrite(i, 255);  // Set LED to full intensity
  }
2 Likes