Relay and virtual pin

This means nothing to Blynk… you must use Blynk functions like BLYNK_WRITE(V1) in order to respond to vPin state changes.

And it is bad form to use delay() with Blynk… use timers instead.

A Lambda shortcut version of a non-blocking timeout timer command/function works nicely.

// Timed Lambda Function - Timeout countdown
  timer.setTimeout(500L, []() {  // Run following command(s) after 500ms
    Blynk.virtualWrite(V1,0);
  });  // END Timer Function
1 Like