Switching servo control between a receiver and an Arduino?

Hello all.
My project involves controlling servos; half the time I want to have the Arduino controlling them using the #servo library but I also want to be able to switch control over to a radio control plane transmitter/receiver setup (IE having the servos controlled from the signal coming out of the receiver).

What's the best way to conceivably go about this?

I've tried sending the receiver signal into the Arduino through the digital input pins, decoding it using the pulseIn function then mapping the result to the servos. This kind of worked but the Arduino seems to get overwhelmed if it receives a large range of signal all at once (IE if I waggle the control sticks on my transmitter a lot, the Arduino just kind of freezes for a few seconds and so do the servos).

I would prefer to do this through the Arduino if I can but I think I will end up hard wiring the output of the Arduinos servo signal pin and the output of the receiver into a switching relay, I'll then use one of the other digital pins to switch the relay between receiver and Arduino control.

If there is a simpler solution to this I would appreciate the advice, I did find that the receiver signal will pass through the Arduino quite nicely in that if you set up the Arduino to send the servo signal pin high every time the receiver input pin goes high then the servo behaves fine but this involves designating the servo pin as a digital pin preventing you from using the servo library, I have tried attaching and detaching the servo in the program but it didn't seem to work.

Thanks for any suggestion
All the best
Bottle

Oddwired:
IE if I waggle the control sticks on my transmitter a lot, the Arduino just kind of freezes for a few seconds and so do the servos

This -might- be because pulseIn() is a blocking function - taking a bit of time to "decode" the PPM signal.

There are a few (?) alternative libraries out there for RC decoding (and servo output) - for instance:

...or you might be able to write your own non-blocking decoder - you'd basically be starting with the "blink without delay" sketch, and working from there - to take input from multiple pins, sampling it, decoding it, then outputting the signals to the servos on other pins. Ultimately doing it all so that the code is non-blocking, while keeping everything as fast as possible (it wouldn't be an easy feat, I will say that).

If you wanted to implement your option, I would use digital logic ICs to shunt the signals around, and likely shift registers of some sort to control the needed pins (because there probably wouldn't be enough pins on a standard UNO for this kind of system otherwise - but with a Mega it might be possible).

As far as I understand it the Servo library uses timer interrupts to generate the output timing, and the pulseIn() function doesn't disable interrupts, so I don't see why this wouldn't work. I suggest you post your code and perhaps somebody will spot what's causing the problem.