10 years, 1 month ago.

Run 2 loops at the same time

Hi,

I am using the LPC1768 for a project, I am trying to run 2 while loops at the same time. Is this possible and if so how do I do it;

Regards, Nick

1 Answer

10 years, 1 month ago.

There are multiple solutions: you can use an RTOS, you can often merge the loops into one, you can use a Ticker to address the second loop while you main is in the first loop or you can perhaps use some sort of interrupt instead of polling for a specific condition in your while loops. Give some more info on what you are trying to do.

Accepted Answer