Transmeet IR commands with RS-232 to control any device

Hi everyone I am a new learner of Arduino spending a lot of time learning to code some of the examples provided in the software. I managed to copy commands of the IR remote control with Arduino and I want to use these IR commands to be transmitted through RS-232 HEX commands. I want to use it in such a way that if I send a HEX command with RS-232 it should select a particular command linked to that RS-232 HEX and transmit with IR emitter diode.
I managed to transmit by using buttons but do not know how to do with RS-232 (Serial Communication. If someone can help me to do one command hope rest I will be able to do all others myself.

Many thanks


An example or two of the messages and the steps you want it to go through would help me understand what you are proposing.


Give the arduino case statement a try, it should do what you want. You can check: This will give you an idea of how to construct the code.

Hi Paul,

Many thanks for your reply


(1) I want to create my own Library or to write a command so if I input as serial code it should send out to
Transmit IR OUT signal.
For example, I write a commander as serial input if it matches then it should transmit an IR Out code linked to that command. If my input is not right it should not do anything.

Same as a remote made with Arduino by pressing a specific button and it gives IR Out for example Power or Volume Up/Down. but in my case, I need a HEX Command as serial Input to do the same instead of a button.

If I understand correctly, you already have a working Arduino program that can send out one or two correct commands using IR.

Then the easiest is make an array of the commands you want to use. Then, I guess you want to use serial data from a PC to send to the Arduino something to tell the Arduino program which one of the commands to send via IR.

How many of the IR HEX codes do you currently have available?