Hi all i suggest that the multi threaidg ability will be added to the arduino IDE . I suggest a simple standard library that does just that with simple implementation will be added . That library will enable threads and synchronisation in a simple and clear way . the idea is to enable multy resources activity like several electrical motors will be controlled in parallel or several A/D will be monitored etc .

A new forum section will be dedicated just for that .

hope I am clear elico

Multithreading is not simple given the flash and ram size of an Arduino. Furthermore I estimate 85% (or more) of the people of the forum would get in trouble due to deadlock , race conditions, resource starvation, priority inversion etc. if I look at the typical problems posted on the forum.

I You can do many things "more than appropiate in parallel" just by design. Biggest point is not to use delay(), millidelay() or microdelay() or other blocking functions...

That said, if you want a multithreading microProc I would advice to have a look at the FEZwhich is programmed in C#. Did some experiments last year with a FEZ and it worked like a charm, separate measuring threads one per sensor, separate processing threads, storage thread and display thread. Check out the panda II - - THe FEZ Cobra is also a nice beast.

Let me hear what you think of the FEZ!

Note: the FEZ can use Arduino shields - maybe not all - what is at least interesting ...

Thanks Looks like this board software side has a long studying curve . But it is worth studying .

My original suggestion is to develop a simple library that will enable basic threading in the form of int Thread_create( ); The parameter given to that function will be the name of the function that will be done by this thread , that global function will be declared and implemented by user . The int return value will be a number of the thread in case of success or 0 in case of failure . the system will let only a certain number of threads depending on the board type .

To my opinion that is easy to be done by skillful C programmers .

Also there are many RTOS out there that can use as a start and ideas source .

I hope someone will look into this suggestion and take arduino one step ahead .

Thanks Elico

There are several rtos prjects for arduino, so people who need multithreading can jump on one of those too. e.g. did you see this one -,87552.0.html -

Thanks I will look into it . looks this is the exact thing i am looking for .

Best Elico