In this post I demonstrate how to use an infrared remote to control the GPIO on a Raspberry Pi.
Normally a remote would be used to control a TV card or XMBC, however they also provide a good interface to control the GPIO on a Raspberry Pi.
Adafruit has a Mini Remote and IR sensor which are perfect for this.
In this example we will use the remote to control a number of LEDs connected to some GPIOs on a Raspberry Pi.
Connect the IR Sensor to the Raspberry Pi
Connecting the IR sensor to a Raspberry Pi is very easy as there are only 3 pins on the sensor, GND, 3v and Output. We will connect the output to GPIO 18. You can choose another pin, just take note of it as you will need to specify this pin when installing LIRC.
We will also connected up three LEDs to GPIOs 23, 24 & 25, and a 270Ω on the GND sound of each LED.
Here is my setup;
![]() | ![]() |
Continue reading How to Control the GPIO on a Raspberry Pi with an IR Remote