Step 1: The Receiver
Step 2: Connecting It All
I connected the signal to pin 8
and the led was connected to pin 11 because it has PWM capabilities.
I also connected the receiver ground to the arduinos ground and the 5v out from the receiver to the Vin on the arduino
Step 3: The Code
I used the pulseIn() function to read the pulses from the receiver and send them to the serial monitor, when i had those values i told the arduino to map those to the PWM values (0-255) and send them to the serial monitor again.
Now when i moved the joystick on the remote i saw the values change.
Now the last part of the code sends those PWM values to the led and fades it accordingly.
I was happy when i got this working but i needed a bit more challenge, i wanted it to control an RGB LED.
Step 4: Connecting the RGB LED
I kept one output on pin 8
the next output was connected to pin 7
and the last to pin 6
Since i was going to use an RGB led i decided to use my protoboard.
The ground of the led was connected to Gnd of the arduino using a 220 ohm resistor
the red was connected to pin 11
the green was connected to pin 10
and the blue was connected to pin 9
Step 5: RGB Code
I also removed the serial commands because i didn't need to debug it anymore.
Then i uploaded it and it worked fine :)
Step 6: Conclusion
It can also control the speed of any motor, just as long as you have different values for different positions of the joysticks you can do virtually anything with this.
The codes are here :)