Four analog pins read, Two digital read, Two digital set, and two pwm (servo) values set, per loop.
With the debugger attached (so running even slower) each loop was completed in 2 milliseconds - 5000 iterations (reading and setting) took around 9 to 10 seconds! about 500 iterations per second.
This leads me to believe there shouldn't be any problems with the netduino in this regard at all.
Here's the very very quickly hacked up code I used for the test:
var axisX = new AnalogInput(Pins.GPIO_PIN_A0);
var axisY = new AnalogInput(Pins.GPIO_PIN_A1);
var axisZ = new AnalogInput(Pins.GPIO_PIN_A2);
var IrFloorSensor = new AnalogInput(Pins.GPIO_PIN_A3);
var out1 = new OutputPort(Pins.GPIO_PIN_D1, false);
var out2 = new OutputPort(Pins.GPIO_PIN_D12, false);
var in1 = new InputPort(Pins.GPIO_PIN_D2, false, Port.ResistorMode.Disabled);
var in2 = new InputPort(Pins.GPIO_PIN_D4, false, Port.ResistorMode.PullUp);
var servo1 = new PWM(Pins.GPIO_PIN_D9);
servo1.SetDutyCycle(0);
var servo2 = new PWM(Pins.GPIO_PIN_D10);
servo2.SetDutyCycle(0);
var stopWatch = Stopwatch.StartNew();
stopWatch.Start();
int i = 0;
bool digState = false;
while (i < 5000)
{
axisX.Read();
axisY.Read();
axisZ.Read();
IrFloorSensor.Read();
in1.Read();
in2.Read();
digState = !digState;
out1.Write(digState);
out2.Write(digState);
servo1.SetPulse(20000, 1500);
servo2.SetPulse(20000, 1500);
i++;
}
stopWatch.Stop();
Debug.Print(stopWatch.ElapsedMilliseconds.ToString());
the stopwatch class is available on the netduino forums.
Now just to test this running on a background thread to see if it can still perform at the same speed.
Just thought this might help out if anyone else is wondering if a netduino would be fast enough for a tricopter.