Go Down

Topic: [gitHub] THREAD and THREADController classes for Arduino (Read 661 times) previous topic - next topic

ivanseidel

May 11, 2013, 08:39 am Last Edit: May 16, 2013, 08:32 am by ivanseidel Reason: 1
Hi,
I always use this library for myself, and I personaly think that is VERY usefull. Its clear that Arduino doesen't support real parallel processes, but we can "sort" of do it with scheduled tasks.

Yes, there is already an class called "Scheduller", but for big projects (likes the ones I do, with more than 15.000 lines), it's not "good" enought...

I LOVE Object Oriented stuff, and this follows it pretty much.

Check out the library here: https://github.com/ivanseidel/ArduinoThread

It also works for ANY arduino, but I implemented thinking on the DUE, since it's capable of more stuff (I use it with my ArduinOS, and it's just perfect =] )

Any suggestions are welcome!
Arduino DueTimer | https://github.com/ivanseidel/DueTimer
Arduino Thread | https://github.com/ivanseidel/ArduinoThread

ivanseidel

I have done lots of testing on it, and it's really robust.

I'm using it in my robot ( tendadigital.net/tag/robocup/), and implemented a nice CPU usage calculation, since we use MANY sensors Threads and knowing it is very nice...
Arduino DueTimer | https://github.com/ivanseidel/DueTimer
Arduino Thread | https://github.com/ivanseidel/ArduinoThread

kcore

Looks like a really nice library.  Also, I think you have done a great job on the documentation and examples.  I have a project in mind it would be perfect for.

Are there any limitation on the maximum amount of threads?

Thanks for the contribution.

ivanseidel


Looks like a really nice library.  Also, I think you have done a great job on the documentation and examples.  I have a project in mind it would be perfect for.

Are there any limitation on the maximum amount of threads?

Thanks for the contribution.


Thanks!

The only limitation is defined on the #MAX_THREADS inside ThreadController.h

Increase that value to better "fit" your project!

Also, since we use Thread* (Thread pointers), the array only increases by 32bits, since we don't store the Thread insite the array, just the place on the memory... Fell free to add up to 21030123131 Threads =]

If you can "Star" the project, I will apreciate!

Ivan
Arduino DueTimer | https://github.com/ivanseidel/DueTimer
Arduino Thread | https://github.com/ivanseidel/ArduinoThread

Go Up