BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Multiple delay running parallel

Two different leds with two different delay running parallel… is it possible?

Delay

If you use long delay() or send your hardware to sleep inside of the loop() expect connection drops and downgraded performance.

DON’T DO THAT:

void loop()
{
  ...
  delay(1000); // this is long delay, that should be avoided
  other_long_operation();
  ...
  Blynk.run();
}

Note: This also applies to the BLYNK_READ & BLYNK_WRITE handlers!

SOLUTION: If you need to perform actions in time intervals - use timers, for example BlynkTimer.

Pete.

1 Like

Thanks for the suggestions