Using an infrared remote control with your Raspberry Pi
It is often useful to control robots remotely. An easy way to add additional input is to make use of an infrared (IR) receiver and a standard remote control. Fortunately, the receiver is well supported.
We will use a module called lirc
to capture and decode IR signals from a standardremote control.
Getting ready
LIRC supports many types of IR detectors, such as Energenie's PiMote IR board; however, since we only need to receive IR signals, we can use a simple (TSOP38238) IR detector:
The three pins of the TSOP38238 IR receiver can fit directly onto the Raspberry Pi header
Install the following packages using the apt-get
 command:
sudo apt-get install lirc lirc-x
Add the following to /boot/config.txt
. This will enable the driver and define the pin the receiver is fitted on (BCM GPIO24):
dtoverlay=lirc-rpi,gpio_in_pin=23
Perform a restart of the Raspberry Pi so that the configuration takes effect:
sudo reboot
We should now find that the IR device...