I have a larger robot running on a Mega2650 and I am working on upgrading it. I am moving to a Due board to upgrade hardware and I was looking for suggestions for improving the sketch. The current sketch loop frequency is about 10Hz, I was hoping to improve that significantly, and eventually add a SLAM module (separate hardware and software) and keep the Arduino as a central processing unit.
The current sketch is 1100 lines, includes 109 variables, and compiles to 56kB. There are 15 outputs and 12 inputs. My loop consists of 10 functions called sequentially.
I have started looking at freeRTOS but am quite intimidated by it so far, as I am a programmer by hobby not profession (I started with Arduino a few years ago), my main focus is just building an interesting robot.
Would you recommend freeRTOS for this project? Do people use freeRTOS successfully for robot applications? If not what do you recommend?