IR controlled LED color mixing...

Hello Everybody
I'm completely new to electronics so I apologize for my newbie way of explaining what I try to do.

I want to build an IR transmitter with three pods that can remote control 3 LEDs for color mixing.
So far, I have figured out on how to have the pots control the intensity of each LED, but even after
a good amount of re-search, I can't figure out on how to send the value that I'm reading of the pots
over an IR signal to the LEDs.

I use this code to get the desired brightness value from the pots:

RVal = analogRead(RLed) / 4;
GVal = analogRead(GLed) / 4;
BVal = analogRead(BLed) / 4;

//gives me a value between 0-255 for each of the three LEDs

My problem no is how to send these values over an IR signal.
I found out on how to pulse the IR signal etc. but I just can't figure
out an easy way to just transmit three bytes of data.

Once the three values are transmitted, I should be able to adjust the LEDs with this code:
analogWrite(ROut, RVal);
analogWrite(GOut, GVal);
analogWrite(BOut, BVal);

Am I generally on the right track, or is there a better way to do it? Any chance somebody can give me some input on how to write the code for this
or direct me to some literature/website that might be helpful? I would really appreciate it :slight_smile:
(PS: Sorry for my English, it's not my native tongue)

I just wanted to add something. What would also help me if somebody could tell me how I can translate a numerical value like for example 125 into binary code....
I'm just looking into how to transmit 24bits over IR (8bits for each LED)....

This is not the normal TV stuff that IR gets used for, you need to look at sending data. It is a bit more advanced, maybe too advanced for your current state of knowledge. Start looking here http://www.irda.org/

There is no need to convert anything into binary, that is how it is stored in the computer.

Thanks for the link. I thought it should be possible with a normal TV remote protocol like the X-Sat or Mitsubishi protocol, since some of them can transmit 32 bit of data, which would be enough for my application...