I'm using a IR transmitter on a Arduino UNO board where I also connected a servo motor and a CC motor and a IR receiver on another Arduino UNO board where i connected a joystick and i'm trying to let them communicate by using IRemote library.

I'd like to receive suggestions on how realize the IR communication.In particular, i have to send just four signals in order to change the CC motor rotation and to control the servo motor.

For example, if i move the joystick UP or DOWN, then CC motor has to change its rotation while if I move the joystick on the left or on the right, then the servo motor has to rotate in different directions.

I don't know anything about the library you are using, but if I was trying to implement a proportional ir remote system, I would use an ir emitter driven directly from the servo library.

I would try something like three servos, on for throttle, one set at a fixed signal just to act as a separator, then the steering servo.

The servo library already implements the type of pulse width encoding used to drive servos and electronic speed controllers, so why invent something else less efficient when you can transmit this directly ?

I am about to get on a plane some will have to leave it at that for now, if your interested in this approach I can help out tomorrow

I can pass the value from joypad directly to the IR emitter by using servo library in order to have a proportional signal.But, i have to receive and recognize these signals on the other side with the IR receiver and i'm not able to figure out how implements this other side of the communication.

I've read what you wrote about the RC and the Arduino, but i cannot figure out how to implement the IR communication.It's ok the servo control part on your article, but it is important to decide what kind of signal the transmitter has to send. :~

Hi, The approach I suggested does not involve the IRRemote library. If all you want to do is send a signal to a servo and a motor through Infra red, then just use the servo library to generate a servo signal, but connect it to an IR Emitter instead of a servo. On the other end you can read the signal and send it straight out to a servo with no additional coding or decoding on either end.

What IR Receiver are you using, if its one that expects a signal in a given frequency range, you can build a small circuit with a 555 Timer to create this signal and then switch it using a PIN driven by the servo library. I can point you to some good online resources for building this part if your receiver needs it, but let me know what type it is first.

Once you have one channel up and running its easy enough to add some more to the signal.

As the previous poster has suggested, then detector you are using requires a 38khz signal. there are libraries that will generate this signal, but they are generally intended for sending infra red remote codes for home entertainment systems such as tvs etc. These libraries will not give you a signal for proportional control of a servo.

One quick experiment to try it to use a 555 timer to generate the 38khz signal for the ir emitter and then use the servo library to drive an arduino pin connected to the reset pin of the 555.

This will generate the correct frequency for your detector, but pulsed in the correct way to provide proportional control of a servo.

The 555 and 556 timer chips are great little devices that can be used for all sorts of projects, so if nothing else you will increase your options for future projects by experimenting with the 555 and 556

EDIT: Alternatively you can search for code examples for generating a 38Khz signal directly from an Ardiuno PIN, there are lots. If you find one that does not use timer 1, you can use an AND gate to combine an Arduino generate servo signal with the Arduino generated 38Khz IR signal to get a proportional 38Khz Servo signal out of the AND gate. I will have a go at putting together an example this evening.

Hi Marcus, Just to make sure I am not leading you in the wrong direction for your project, can you give a quick outline of what you want the end result to be, then we can make a better judgement on IR or any other alternatives.