Learn how to use infrared LEDs to send signals to your TV and other electronic devices via an Arduino. First, the Arduino will interpret IR pulses sent out by the TV remote, save them to memory, then “replay” them upon the user’s command. You can use these techniques to make other electronics controllable via IR signals..
Decoding the IR signal may seem difficult, but luckily there is a pre-built library you can use. Just copy and paste it into the Arduino library folder and you’re good to go.
For more Detail: Control Electronics using an Arduino and Infrared LEDs