Using an Infra-Red 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 IR (infra-red) 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 standard remote 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.
Install the following packages using apt-get
:
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 is...