Program loop runs slow with Blynk, can't find why

I guys

my program loop runs slow with Blynk, can’t find why, if I put something directly in the loop function it cycles like every second - can’t figure it out please would someone know if the timers slow down the whole thing in the void loop() function too?

@Lukas_Holoubek please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

That’s because rather than copying and pasting the backtick characters I provided, you decided to type some other characters instead.

Pete.

As I scanned through your code I noticed at least one while command. While is a blocking command and it’s not generally a good idea to use it in code that’s called by your void loop.

I have no idea what the purpose of your code is, but it looks badly structured to me. Som in- code documentation would be a start.
Moving items into timers is the way to go, and staggering those timers so that don’t all get called at exactly the same time is good practice.

If you want to identify which process(es) are slowing down your code then try commenting some out and seeing what effect they have.

Pete.

Thanks Pete, while is used only for motor reset, there it is OK to stop the code - during this time the whole project is starting. I had the same idea of using different time for calling the functions - I’ll try that one out too

You were calling Stepper_Reset in every void loop cycle and that contained a while statement.

Pete.