Is it possible to do multitasking in arduino
Is it possible to do multitasking in arduino
OK, I noticed you did not actually get an answer your question
YES you can do multitasking on an arduino... sort of
whether you want to depends on what your trying to achieve
How successful it is depends on the complexity and available resources in the chip you choose to use, primarily RAM and Speed etc.
You will never achieve the sophistication of multitasking on Windows, Linus or similar OS, the micro-controllers are just not up to the task for the reasons above and there not meant to be either. If you want that kind of multitasking then look to a PI, net-duino, beagle bone or better.
If you need a simple scheduler (Poor man multitasking
) to ensure certain tasks are performed at specific intervals then this is much more common and there are plenty of examples on how to do this
here is couple to get you going
http://arduino.cc/en/Reference/Scheduler#.UysGfXmPJIk,
and
http://www.codeproject.com/Tips/731031/Scheduler-Library-for-Arduino
Hope this helps
Peter
OK, I noticed you did not actually get an answer your question
YES you can do multitasking on an arduino... sort of
whether you want to depends on what your trying to achieve
How successful it is depends on the complexity and available resources in the chip you choose to use, primarily RAM and Speed etc.
You will never achieve the sophistication of multitasking on Windows, Linus or similar OS, the micro-controllers are just not up to the task for the reasons above and there not meant to be either. If you want that kind of multitasking then look to a PI, net-duino, beagle bone or better.
If you need a simple scheduler (Poor man multitasking
) to ensure certain tasks are performed at specific intervals then this is much more common and there are plenty of examples on how to do this
here is couple to get you going
http://arduino.cc/en/Reference/Scheduler#.UysGfXmPJIk,
and
http://www.codeproject.com/Tips/731031/Scheduler-Library-for-Arduino
Hope this helps
Peter