RC Receiver Servo out Signal to Servo

hey folks,
I am new to Arduino, I programmes some C# and VBA before but never in connection with hardware.

I am so far to let LEDs blinks, move a servo and show some stuff on a display

how can I connect a RC-receiver to the Arduino Uno and read the servosignal to send it to a servo ?
the servo gets the angle it should move
to controll the servo I use following code:

// Sweep
// by BARRAGAN <http://barraganstudio.com>
// This example code is in the public domain.


#include <Servo.h>
Servo myservo;  // create servo object to control a servo
                // a maximum of eight servo objects can be created
int pos = 0;    // variable to store the servo position
 
void setup()
{
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}
void loop()
{
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
}

"pos" is the angle of the servo in degrees

greets Phil

What the Servo library sends to the servo is a pulse of (roughly) 1000 to 2000 microseconds (1 to 2 milliseconds).

Strangely enough, that's exactly the same kind of signal the RC receiver sends to the servo.

You can use the "pulseIn()" function (http://arduino.cc/en/Reference/PulseIn) to measure a pulse in microseconds.

You can use the 'servo.writeMicroseconds()' function (Servo - Arduino Reference) to tell the Servo library how long the outgoing pulses should be.

is there no possibility to get the signal in degrees? which is a bit easyer to work with

RCFox:
is there no possibility to get the signal in degrees? which is a bit easyer to work with

If you want to throw away 82% of your resolution:

 int degrees = map(pulselength, 1000, 2000, 0, 180);

thanks a lot, this really helped me
here the Code I used

//parts marked with "RC" are for the receiver part
//parts marked with "LCD" are for the LCD part
//parts marked with "Servo" are for the Servo part
int pin = 7; //RC
unsigned long duration; // RC

#include <Wire.h> //LCD
#include <LiquidCrystal_I2C.h> //LCD
LiquidCrystal_I2C lcd(0x3F,20,4); //LCD

#include <Servo.h> //Servo
Servo myservo; //Servo
int pos = 0;  //Servo

void setup()
{
  pinMode(pin, INPUT);//RC
  
  lcd.init(); //LCD 
  lcd.init();  //LCD
  lcd.backlight(); //LCD
  
  myservo.attach(9);//Servo
}

void loop()
{
  duration = pulseIn(pin, HIGH); //RC
  
  lcd.setCursor(3,0);//LCD
  lcd.print("Pulslength");//LCD
  lcd.setCursor(2,1);//LCD
  lcd.print("            ");//LCD
  lcd.setCursor(2,1);//LCD
  lcd.print(duration);//LCD
  
  myservo.writeMicroseconds(duration);//Servo
}