Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • You could use a timer interrupt and build your own scheduler, like any preemptive multitasking OS on a single core machine (though resources will be tight). But it is probably better to do your long tasks in pieces, perhaps as state machines that advance one state each time they are called. If the thing that needs to happen in the meantime is simple, perhaps you could just do that in an interrupt on the timer or some relevant occurence (pin change, serial rx, etc) Commented May 14, 2016 at 15:34