How do I read RC receiver for RC Paintball Marker?

I am currently working on a RC paintball gun turret. I have 2 servos controlled by a 3ch Hitec Aggressor for the tilt/pan. I want to use the 3rd channel (intended for a gear shifter on an RC car) to shoot the gun.

The gun is a Tippman A5 w/ egrip. Ive already hacked the gun and can shoot it via my Arduino Duemilanove. All I have left to do is figure out how to read the output of the Hitec receiver and convert that to something I can use (input from the 3rd channel = gun shoots).

I would greatly appreciate any help. Thanks.

From what I'm reading, all 3 channels are designed to operate servos. If you've got 3 wire servos on channels 1 and 2, the servo control wire on the third channel should go HIGH when you push the button, and LOW when you release it. Connect that wire to a digital pin (after verify that that is indeed it operates, and that it only outputs 5 volts), and use digitalRead to read that pin.

Thanks for the reply. Unfortunately that was the first thing I tried. When the third channel is connected to a servo, a press of the button causes the servo to rotate 90 deg. Another press causes the servo to rotate 90 deg in the opposite direction. When I read the signal using the analogRead() function it gives me random values unrelated to my RC input. When I use the pulseIn() function, again I get seemingly random values independent of RC input.

I need to decode the RC receiver output but can't figure out how.

You could make the servo push a button...

I thought about that but I wanted something a bit more elegant, for lack of a better term. Surely there must be some way to have the Arduino sense a change in the RC receiver output when the 3rd channel button is pressed and then send the signal to the marker to shoot.

I wonder if the word elegant has ever been used in terms of paintball...

If you had an oscilloscope, you could look at the signal sent to the sensor, and probably make some sense of it.

But, I'm thinking that the signal is a PWM signal switching from 0 to +5V very quickly. The duration that the signal is HIGH is what holds the servo in a particular position.

Elegant and paintball can go in the same sentence, as long as there's a not in there somewhere. :)

If that's the case, how would I decode the PWM signal?

If it's not too fast:

Ive tried using the pulseIn() function but I don't think I know how to properly use it.

I think I need it explained to me in terms of apples, i.e., if Bob has 0 apples and Sally gives Bob 5000 apples per second...

I've look in the Arduino Reference section and have been reading about it for days but its not making sense.