rc input: can I use analogRead?

Please excuse me, I'm very new to all of this (programming, arduino, etc.)

I want to convert a signal from an rc remote to a pwm signal. I connected the receiver of the remote to a multimeter to make sure that I'm getting a varying voltage, and I am. 0V when not touching the joystick and 5V when I pull the joystick completely (with nice steady values in between). In reading through the forum and google a bit it seems that people are doing stuff with PPM with RC remotes, but I'm hoping I don't have to go that route, since I seem to be getting good voltage values. (I've tried copying and pasting a few of those codes with zero luck...it's a bit over my head at the moment).

In any case, I AM having problems with the analogRead and analogWrite functions, mostly the analogWrite. As soon as I try taking in the signal using analogRead, I notice I'm getting a serious lag; when I pull on the joystick, it takes a couple seconds or so for the reading to change on the serial monitor. I'm also losing resolution on my voltage. Both the input and output seem to be just high or low.

It feels like I might have to explore the PPM more, but I'm hoping there's an easier solution. If I have to do PPM, is there something simpler than these? I just haven't gotten them to work.
(RCArduino: How To Read RC Receiver PPM Stream)
(Arduino Playground - ReadReceiver)
(Read PPM signals from RC receiver or Control - Exhibition - Arduino Forum)
(Arduino ppm signal reader and generator - RC Groups)

here's my current simple code:

const int input1Pin = 1;    //designate input and output pins from remote to motors
const int input2Pin = 0;
const int output1Pin = 9;
const int output2Pin = 6;



int ch1;                     // channel values
int ch2;


void setup() 
{
//  pinMode(output1Pin, OUTPUT);    //unnessecesary for analogWrite function
//  pinMode(output2Pin, OUTPUT);
    Serial.begin(9600);           
}



void loop() 
{
  displayinputsoutputs();

  ch1 = analogRead(input1Pin);
  ch2 = analogRead(input2Pin);

  analogWrite(output1Pin, map(ch1, 0, 1023, 0, 256));
  analogWrite(output2Pin, map(ch2, 0, 1023, 0, 256));
  
}



void displayinputsoutputs()
{

  Serial.print("Channel 1:"); 
  Serial.println(ch1);                  //print the value of each channel
  Serial.print("Channel 2:");
  Serial.println(ch2);
  
  Serial.print("Channel 1 Output:");
  Serial.println(map(ch1, 0, 1023, 0, 256));
  Serial.print("Channel 2 Output:");
  Serial.println(map(ch2, 0, 1023, 0, 256));
  
  Serial.println(" ");

  delay(500);

}

Every time through loop, you're doing a 500ms delay.... that's not helping.

If you are talking about a real hobby-grade RC receiver (that would normally drive hobby servos using PPM signals) - then the proper way to read the signal is not by using "analogRead()", but instead using "pulseIn()":

http://www.arduino.cc/en/Reference/PulseIn

This will give you a value (in microseconds). See also these links:

http://playground.arduino.cc/Code/ReadReceiver

http://diydrones.com/profiles/blogs/705844:BlogPost:38393

Note that this isn't the most efficient way - as "pulseIn()" is a blocking function (not something you really want) - but it will get you "up and running". You can instead write your own function (similar to the blink-without-delay example) so that it isn't blocking - here's an example:

Thanks folks. I've gotten the pulseIn to work with one channel, but it's pretty clunky with two channels (big delays and I give it any input); I suppose that's probably because of the blocking nature of it. I'll look more into the PPM and the blink without delay example. Thanks for the direction, cr0sh.