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

Scroll to Top
Read previous post:
Raspberry Pi Weather Station
Raspberry Pi Weather Station

Build a personal weather station with Raspberry Pi that emails you the temperature, humidity, and rainfall. *In a couple of...