Raspberry Pi as IR Remote (LIRC)

If you are like me and hate to look for TV/projector/speakers remote, you will be happy to know that you can use your Raspberry Pi and your computer or phone to act as IR remote.

What you need?

  • Raspberry Pi
  • 940nm IR diode (preferable super bright)
  • 200 Ohm resistor
  • NPN transistor (BC547 or S9014 or similar)
  • Some jumper cables
  • Decoded remote configuration from my previous post Raspberry Pi as IR remote decoder (LIRC)

Raspberry Pi as IR Remote (LIRC)

Transistor is needed to increase our remote effective range. You can connect diode directly to GPIO but it will be to weak to be useful. You can also use 5V to increase range.


Instalation is the same as in my IR decoder post Raspberry Pi as IR remote decoder (LIRC).

    sudo apt-get install lirc
    sudo echo 'lirc_dev' >> /etc/modules
    sudo echo 'lirc_rpi gpio_in_pin=18 gpio_out_pin=17' >> /etc/modules
    sudo wget http://raw.github.com/mswietlicki/Blog/master/Files/lirc_hardware.conf > /etc/lirc/hardware.conf
    sudo wget http://raw.github.com/mswietlicki/Lirc_remotes/master/benq.config -O /etc/lirc/lircd.conf
    sudo /etc/init.d/lirc restart


Now we can use irsend to send command to your device.

To send command once:

    irsend SEND_ONCE benq ON

Raspberry Pi as IR Remote (LIRC) schematic

To send command many times:

    irsend SEND_START benq ON
    irsend SEND_STOP benq ON

To list all commands:

    irsend LIST benq ""

To list all install remotes:

    irsend LIST "" ""


For more detail: Raspberry Pi as IR Remote (LIRC)

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top