Infrared remote control module

Install LIRC

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install lirc

Set up the GPIO pins

sudo vi /boot/config.txt

# Uncomment this to enable the lirc-rpi module

dtoverlay=lirc-rpi,gpio_in_pin=9,gpio_out_pin=10,gpio_in_pull=up

Set up the module

sudo vi /etc/lirc/hardware.conf

# /etc/lirc/hardware.conf

#

LIRCD_ARGS=""

DEVICE="/dev/lirc0"

MODULES="lirc_rpi"

sudo vi /etc/lirc/lircd.conf

# Please make this file available to others

# by sending it to <lirc@bartelmus.de>

#

# this config file was automatically generated

# using lirc-0.9.0-pre1(default) on Thu Aug 17 20:40:11 2017

#

# contributed by Arjan van Vught mailto:info@raspberrypi-dmx.nl

#

# brand:

# model no. of remote control:

# devices being controlled by this remote:

# http://www.raspberrypi-dmx.org/raspberry-pi-artipprog

begin remote

name /home/pi/lircd.conf

bits 16

flags SPACE_ENC|CONST_LENGTH

eps 30

aeps 100

header 9023 4527

one 557 1682

zero 557 576

ptrail 556

repeat 9020 2261

pre_data_bits 16

pre_data 0xFF

gap 107933

toggle_bit_mask 0x8080

begin codes

KEY_OK 0x02FD

KEY_UP 0x629D

KEY_DOWN 0xA857

KEY_LEFT 0x22DD

KEY_RIGHT 0xC23D

KEY_NUMERIC_POUND 0x52AD

KEY_NUMERIC_STAR 0x00FF42BD

KEY_NUMERIC_0 0x4AB5

KEY_NUMERIC_1 0x6897

KEY_NUMERIC_2 0x9867

KEY_NUMERIC_3 0xB04F

KEY_NUMERIC_4 0x30CF

KEY_NUMERIC_5 0x18E7

KEY_NUMERIC_6 0x7A85

KEY_NUMERIC_7 0x10EF

KEY_NUMERIC_8 0x38C7

KEY_NUMERIC_9 0x4AB5

end codes

end remote

sudo reboot

Testing the configuration

pi@rpi-artipprog-lcd:~ $ irw

0000000000ff02fd 00 KEY_OK /home/pi/lircd.conf

0000000000ff22dd 00 KEY_LEFT /home/pi/lircd.conf

0000000000ff629d 00 KEY_UP /home/pi/lircd.conf

0000000000ffc23d 00 KEY_RIGHT /home/pi/lircd.conf

0000000000ffa857 00 KEY_DOWN /home/pi/lircd.conf

0000000000ff52ad 00 KEY_NUMERIC_POUND /home/pi/lircd.conf

0000000000ff6897 00 KEY_NUMERIC_1 /home/pi/lircd.conf

0000000000ff9867 00 KEY_NUMERIC_2 /home/pi/lircd.conf