Blynk unable to use delay - alternative?

Evening All,

I’ve just started experimenting with Blynk (blynk.cc) and want to add it to a sketch I have put together.

The issue I’m having is that I can’t use delay commands with blynk (for reasons I don’t yet understand). My coding skills are very basic and I’ve used delays all over the place to create things like stepper motor pulses and to time linear actuators.

It’s been suggested that I might use simpletimer in place of delay but I can’t for the life of me figure out how simpletimer replaces delay. Can anyone offer an example and explanation of how I might do this?

BLYNK_WRITE(V6) // Widget in the app Writes Virtal Pin V6 with the certain frequency (PUSH most likely)
{
  // This command writes the value from V6
  int pinData = param.asInt(); 
  if (pinData == 1)) {
    digitalWrite(Warning, HIGH); 
    delay(1000); //can't use delay with Blynk, use SimpleTimer?
    digitalWrite(DoorDir, LOW); //defines the stepper motor direction

    while (Distance < 5000L) { //this while loop is creating the pulses for a stepper motor driver. 
      digitalWrite(DoorPulse, HIGH); 
      delayMicroseconds (100); //Can't use delay with Blynk, use SimpleTimer?
      digitalWrite(DoorPulse, LOW);
      delayMicroseconds (100); //can't use delay with Blynk, use SimpleTimer?
      Distance = Distance + 1; 
      delayMicroseconds(100); //can't use delay with Blynk, use SimpleTimer?
    }
    digitalWrite(PlatformUp, HIGH); 
    delay(1000); //can't use delay with Blynk, use SimpleTimer
    digitalWrite(PlatformUp, LOW); 
    delay(1000); //Can't use delay with Blynk, use SimpleTimer?
    digitalWrite(Warning, LOW); 
    delay(1000); //can't use delay with Blynk, use SimpleTimer?
    Distance = 0;
  }
}

You'll want to use millis like in the Blink Without Delay example. But to do so you have to change your thinking. Instead of thinking in terms of do something, wait until it is time, do something else you have to think in terms of letting the loop function run really fast and check to see if it is time to do something and if so do it and if not move on. Don't think of loop like a series of steps, think of it more like a flow chart or checklist to figure out what needs to be done at this moment.

Thanks Delta. So I should be looking at this more like a day planner? - At 1pm do this till 2pm, at 3pm do this? I'll have another look at blink without delay. Thanks. James