What are the many ways to run multiple threads in arudino..?

I want to blink a LED after every 10 seconds & parallelly want to execute my code in the loop in arduino UNO. What are the several ways to do it? Please share the code if possible.

Have a look at the demo Several Things at a Time. It flashes 3 LEDS and operates a servo.

...R

Robin2:
Have a look at the demo Several Things at a Time. It flashes 3 LEDS and operates a servo.

And this is done with a single thread of execution, without any multithreading.

We can and do multi thread on any and ALL single CPU processors.

THIS HAS BEEN TRUE SINCE THE 1950! AND UNIVAC.

Multi threading does not require multiple processors or cores!

Multi processing does not require multiple processors or cores!

All it means is saving where we are upto in one job/task and then moving on to some other task.

The speed of the CPU (Even when they ran at kilo hertz ) makes such that they appear to do many things at the same time. This is what is meant (At least in the university I got my IT degree from ) as multi threading.

The same trick is used to do multi processing which, also, does not require multiple processors!

Just be cause the Thread class is not used and not supported by/on the arduinos does not mean that they do not multi thread.

What Robin2 shows in his "how to do more than one thing at a time" post IS MULTI THREADING.

Mark

I've started a new thread What is "multi threading and how do we do it"? - Bar Sport - Arduino Forum

toavoid a hijack

Mark