#!/bin/bash sudo apt update sudo apt -y install lirc echo lirc_dev | sudo tee -a /etc/modules echo lirc_rpi gpio_in_pin=23 gpio_out_pin=22 | sudo tee -a /etc/modules echo \# /etc/lirc/hardware.conf | sudo tee /etc/lirc/hardware.conf echo \# Arguments which will be used when launching lircd | sudo tee -a /etc/lirc/hardware.conf echo LIRCD_ARGS="--uinput" | sudo tee -a /etc/lirc/hardware.conf echo | sudo tee -a /etc/lirc/hardware.conf echo \#Dont start lircmd even if there seems to be a good config file | sudo tee -a /etc/lirc/hardware.conf echo \#START_LIRCMD=false | sudo tee -a /etc/lirc/hardware.conf echo | sudo tee -a /etc/lirc/hardware.conf echo \#Dont start irexec, even if a good config file seems to exist. | sudo tee -a /etc/lirc/hardware.conf echo \#START_IREXEC=false | sudo tee -a /etc/lirc/hardware.conf echo | sudo tee -a /etc/lirc/hardware.conf echo \#Try to load appropriate kernel modules | sudo tee -a /etc/lirc/hardware.conf echo LOAD_MODULES=true | sudo tee -a /etc/lirc/hardware.conf echo | sudo tee -a /etc/lirc/hardware.conf echo \# Run "lircd --driver=help" for a list of supported drivers. | sudo tee -a /etc/lirc/hardware.conf echo \#DRIVER="UNCONFIGURED" | sudo tee -a /etc/lirc/hardware.conf echo DRIVER="default" | sudo tee -a /etc/lirc/hardware.conf echo \# usually /dev/lirc0 is the correct setting for systems using udev | sudo tee -a /etc/lirc/hardware.conf echo DEVICE="/dev/lirc0" | sudo tee -a /etc/lirc/hardware.conf echo MODULES="lirc_rpi" | sudo tee -a /etc/lirc/hardware.conf echo | sudo tee -a /etc/lirc/hardware.conf echo \# Default configuration files for your hardware if any | sudo tee -a /etc/lirc/hardware.conf echo LIRCD_CONF="" | sudo tee -a /etc/lirc/hardware.conf echo LIRCMD_CONF="" | sudo tee -a /etc/lirc/hardware.conf #!/bin/bash sudo apt update sudo apt -y install lirc echo dtoverlay=lirc-rpi,gpio_in_pin=23,gpio_out_pin=22 | sudo tee -a /boot/config.txt sudo sed -i '/driver = */cdriver = default' /etc/lirc/lirc_options.conf sudo sed -i '/device = */cdevice = /dev/lirc0' /etc/lirc/lirc_options.conf sudo shutdown -r now sudo systemctl stop lircd sudo systemctl start lircd irsend SEND_ONCE test3 KEY_MODE