Connecting Arduino to RC Receiver

I'm trying to connect my FlySky Extra FS-GTR 3 Channel R/C Car 2.4Ghz Receiver to an Arduino Mega 2560 board and I can not find any current compatable programs. If anyone has any leads/tips they would be greatly appreciated.

link to receiver: http://www.hobbypartz.com/fs-gtr3c-receiver.html

Thanks, Austin

Here is a program I wrote to expand the pulse length of an RC channel and output it again.

const byte yawInPin = 7;
const byte yawOutPin = 8;
unsigned long yawDuration;

const byte thrInPin = 9;
const byte thrOutPin = 10;
unsigned long thrDuration;

void setup()
{
  Serial.begin(115200);
  pinMode(yawInPin, INPUT);
  pinMode(yawOutPin, OUTPUT);

  pinMode(thrInPin, INPUT);
  pinMode(thrOutPin, OUTPUT);
}

void loop()
{
  yawDuration = pulseIn(yawInPin, HIGH);
  yawDuration = map(yawDuration, 1000, 1800, 980, 2020);
  digitalWrite(yawOutPin, HIGH);
  delayMicroseconds(yawDuration);
  digitalWrite(yawOutPin, LOW);  

  thrDuration = pulseIn(thrInPin, HIGH);
  thrDuration = map(thrDuration, 1000, 2000, 980, 2020);
  digitalWrite(thrOutPin, HIGH);
  delayMicroseconds(thrDuration);
  digitalWrite(thrOutPin, LOW);  
}

A bit more info on what you are trying to accomplish may be helpful.

If for instance you are trying to get the receiver to activate a program on the Arduino you would determine the pulse width of the pulse coming from the receiver using something like UKHeliBob has is his example program

yawDuration = pulseIn(yawInPin, HIGH);

In this case yawDuration would get the pulse width coming from your receiver (1ms-2ms), you could use this pulse to determine if a stick or switch were in a certain position, and if so execute whatever task you want the Arduino to accomplish.

If this is similar to your other question you posted in the programming forum regarding the ESC, basically the solution to that is to monitor the position of the switch (whether a switch physically connected to Arduino or a channel from receiver like the example above), if switch is in say position A check pulseIn and send an identical pulse out on another pin to the ESC so that the Arduino has no real effect as it is just acting as a pass through. If switch is in position B then the Arduino ignores the incoming pulses and simply outputs correct pulses to do what is required.

You stated in your other post that you were able to get the ESC to work from the Arduino so I think you have a firm grasp on what wire does what and what is required to drive an ESC (or servo) as far as what pulses to send, so it seems that what you are likely needing help with is the pulseIn portion which UKHeliBob's code gives a very good example of (and also demonstrates how to send the correct pulse out).

You said 2.4GHz, that is typically a long range, high speed communication frequency. I some Xbee's use that frequency range to make wireless Serial connections/networks.

My bet is it either connects to a serial port or the SPI header.

harddrive123:
You said 2.4GHz, that is typically a long range, high speed communication frequency. I some Xbee's use that frequency range to make wireless Serial connections/networks.

My bet is it either connects to a serial port or the SPI header.

A good share of modern commercial RC equipment is 2.4GHz stuff, from low end chinese knockoff stuff to high end everyone seems on the 2.4GHz bandwagon (lots of positives on this, higher speed, better range, frequency hop, less interference, etc).

The receiver above is just a standard 3 channel RC receiver meant for RC cars or other ground vehicles, one channel is meant to be steering, one throttle, and the third is a spare which I am thinking he is trying to use to get his Arduino to do something fun.