-
-
Save rungix/d3fbbf36c337d38091b1d12d8bc4784b to your computer and use it in GitHub Desktop.
Getting lirc to work with Raspberry Pi 3 (Raspbian Stretch)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - I bought IR shield (made by LinkSprite) for Raspberry Pi 3 from Amazon [1]. The vendor has some documentation [2] | |
| but that doesn't work completely in Raspbian Stretch. Following are the changes that I made to make it work. | |
| $ sudo apt-get update | |
| $ sudo apt-get install lirc | |
| # Add the following lines to /etc/modules file | |
| lirc_dev | |
| lirc_rpi gpio_in_pin=18 gpio_out_pin=17 | |
| # Add the following lines to /etc/lirc/hardware.conf file | |
| LIRCD_ARGS="--uinput --listen" | |
| LOAD_MODULES=true | |
| DRIVER="default" | |
| DEVICE="/dev/lirc0" | |
| MODULES="lirc_rpi" | |
| # Update the following line in /boot/config.txt | |
| dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17 | |
| # Update the following lines in /etc/lirc/lirc_options.conf | |
| driver = default | |
| device = /dev/lirc0 | |
| $ sudo /etc/init.d/lircd stop | |
| $ sudo /etc/init.d/lircd start | |
| # Check status to make lirc is running | |
| $ sudo /etc/init.d/lircd status | |
| # Reboot before testing | |
| $ reboot | |
| # To test if lirc driver is working | |
| $ sudo /etc/init.d/lircd stop | |
| $ mode2 -d /dev/lirc0 | |
| <press a key in remote and you should multple lines like below> | |
| pulse 560 | |
| space 1706 | |
| pulse 535 | |
| [1] https://www.amazon.com/Infrared-Shield-for-Raspberry-Pi/dp/B00K2IICKK/ref=pd_sbs_328_1?_encoding=UTF8&psc=1&refRID=1QPY33VFCGETBJ17K8QE | |
| [2] http://learn.linksprite.com/raspberry-pi/shield/infrared-transceiver-on-raspberry-pi-lirc-software-installation-and-configuration/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment