Friday, September 5, 2014

Things are getting complex

While my code size is getting bigger and bigger I realize it will be hard work to debug with my actual coding style. I do all my readings and communications with a lot of state machines (switch cases). This kind of coding style will work, i guess, but i think even when it´s getting more complex it won´t be easy to read anymore.

So I was looking for an alternative coding style today and read a lot about Scheduler and RTOS (real time operating systems). Those little systems are the clue in ,my opinion, when it´s getting more complex and you have to manage several tasks at the same time like reading inputs, setting outputs, serial communication and  updating a display.

At the end of the day i got those three favourites:
  • NilRTOS-Arduino (preemtive scheduler/multitasking)
  • SCoop (cooperative scheduler/multitasking)
  • ArdOS (cooperative scheduler/multitasking)

When i took a closer look to the code and usage of those three multitasking-systems I realised that NilRTOS is a little bit overdosed for my purpose. It has too many features i won´t use and the art of coding for an arduino beginner like me is another level in this RTOS.
SCoop and ArdOS seem much more user friendly in my opinion and are not to hard to implement i think. I haven´t made a decision yet, which of those two multitasking-systems i will use. Both look very similar.
Maybe you have implementet SCoop or ArdOS in an arduino project and can help me with my decision.

No comments:

Post a Comment