Connect VCC to 3V3 Pin
Connect GND to Ground Pin
Connect IR0 to GPIO22 Pin
Install LIRC
sudo apt-get install lirc
Open the modules file
sudo nano /etc/modules
Then add the following lines to it:
lirc_dev
lirc_rpi gpio_in_pin=23 gpio_out_pin=22
To save, press CTRL+X -> y -> Enter
Open the hardware.conf file
sudo nano /etc/lirc/hardware.conf
Then change the following lines:
DRIVER="default"
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"
To save, press CTRL+X -> y -> Enter
Reboot the Raspberry Pi
sudo reboot
Stop the lirc service and start to output raw data from the IR receiver
sudo /etc/init.d/lirc stop
mode2 -d /dev/lirc0
To view the allowed button names, type:
irrecord --list-namespace
Record signals by following the instructions on screen and saving them into the new file called lircd.conf:
irrecord -d /dev/lirc0 ~/lircd.conf
Change the name of the remote to whatever
sudo nano lircd.conf
To save, press CTRL+X -> y -> Enter
Now copy the created lircd.conf file to the lirc folder:
sudo cp lircd.conf /etc/lirc/lircd.conf
Start the lirc service
sudo /etc/init.d/lirc start
To test the signals, type irw then press buttons on the remote:
irw
Note: If you are getting multiple outputs per button press, you can add the following line in the /etc/lirc/lircd.conf file:
suppress_repeat 2
Instructions taken from here and here
sudo apt-get install lirc
Open the modules file
sudo nano /etc/modules
Then add the following lines to it:
lirc_dev
lirc_rpi gpio_in_pin=23 gpio_out_pin=22
To save, press CTRL+X -> y -> Enter
Open the hardware.conf file
sudo nano /etc/lirc/hardware.conf
Then change the following lines:
DRIVER="default"
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"
To save, press CTRL+X -> y -> Enter
Reboot the Raspberry Pi
sudo reboot
Stop the lirc service and start to output raw data from the IR receiver
sudo /etc/init.d/lirc stop
mode2 -d /dev/lirc0
To view the allowed button names, type:
irrecord --list-namespace
Record signals by following the instructions on screen and saving them into the new file called lircd.conf:
irrecord -d /dev/lirc0 ~/lircd.conf
Change the name of the remote to whatever
sudo nano lircd.conf
To save, press CTRL+X -> y -> Enter
Now copy the created lircd.conf file to the lirc folder:
sudo cp lircd.conf /etc/lirc/lircd.conf
Start the lirc service
sudo /etc/init.d/lirc start
To test the signals, type irw then press buttons on the remote:
irw
Note: If you are getting multiple outputs per button press, you can add the following line in the /etc/lirc/lircd.conf file:
suppress_repeat 2
Instructions taken from here and here