Skip to main content
2 of 3
deleted 1 character in body
dda
  • 1.6k
  • 1
  • 12
  • 18

I want tho run them at the same time but in a different loop.

First of all, you can only do one thing at a time. So that's out.

Secondly, to run multiple loops sequentially (one at a time), it is fairly easy:

void loop1(void) {...}
void loop2(void) {...}
...

void loop(void) {
  loop1(); //run loop1
  loop2(); //run loop2
  ...
  loopn(); //run loopn
}

Whether it works will depend on how you have coded those loops.

dannyf
  • 2.8k
  • 11
  • 13