Loading...
Pages: [1]   Go Down
Author Topic: MULTI THRAEDING IN ARDUINO - LIBRARY and FORUM section  (Read 296 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Netherlands
Offline Offline
Tesla Member
***
Posts: 6814
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 - http://www.ghielectronics.com/catalog/product/256 - 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 ...
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Offline Offline
Jr. Member
**
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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



 



Logged

Netherlands
Offline Offline
Tesla Member
***
Posts: 6814
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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 - http://arduino.cc/forum/index.php/topic,87552.0.html -
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Offline Offline
Jr. Member
**
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Best
Elico
Logged

Pages: [1]   Go Up
Print
 
Jump to: