I see in this forum topic /YaBB.pl?num=1198250369/4
that freertos requires quite a bit of memory...
But given the 8k RAM on the mega it seems like a collection of 4 or 5 tasks might be a reasonable approach to my problem ...
I am after comments and advice
Objective - sail-by-wire model boat (to try different techniques for control, trim etc)
Rough idea of task assignment and devices..
Task 1: monitor radio-control channels for course correction/adjustment
digital input to read radio-control-servos settings (PWM input for course change)
update heading target variable
Task 2: monitor boat heading, heal, velocity and location - set control corrections.
accelerometer (SPI interface)
maybe compass (UART interface)
maybe gps (UART interface)
given acceleration (heel) and sail position and desired change of course is it possible? [yes, requires tack]
Directly adjusts foil angles (rudder, daggerboard) by servos via PWM.
Set target on winches; take in, let out, hold.
2 or 3 winches...
task 3: main sail
task 4: jib sail
task 5: ballast location
three digital outputs: direction, enable, drive
(maybe) analogue input: tension sensor
(maybe) digital input: position coding
Using feedback take-in or release line to achieve control changes..
later: some layouts require winches operating against each other, one controlling, the other just maintaining minimum tension to avoid tangles..