sudo /etc/init.d/lirc stop
sudo /etc/init.d/lirc start
  • In latest Raspberry PI firmware (firmware version 3.18.x per 25th January 2015), there is an additional file that need to be edited, which is /boot/config.txt.
  • You need to add this line into /boot/config.txt.
dtoverlay=lirc-rpi.gpio_in_pin=23.gpio_out_pin=22
  • After changing /boot/config.txt restart the Raspberry PI.
  • To send and receive signal with Raspberry PI, I need to specify which pin is used for the IR transmitter (IR LED) and which one is used as IR receiver.
  • The components used are roughly as follow.
    • IR LED.
    • IR receiver (please note the frequency).
    • PN2222 transistor.
    • 10 Kilo Ohm resistor to be put between Raspberry PI GPIO pin and the PN2222 transistor.
  • For this tutorial.
    • Pin 22 is for IR receiver.
    • Pin 23 is for IR LED.
  • There are 4 diagrams to connect/wire everything up.
  • There is "view the updated one here" schematics listed in the website. I think I would just stuck on that one.
  • Testing IR receiver by running this commands.
sudo /etc/init.d/lirc stop
mode2 -d /dev/lirc0
  • After this try to press some button in IR based remote to test.
  • For testing IR LED I need a configuration file.
  • This is like a dictionary that stores pattern for Raspberry PI.
  • There is this method called, irrecord within LIRC library.
  • Use irrecord --list-namespace to see valid names.
  • The configuration file is stored in /etc/lirc/lircd.conf