Skip to content

Instantly share code, notes, and snippets.

@luciancaetano
Forked from prasanthj/lirc-pi3.txt
Created May 6, 2019 15:24
Show Gist options
  • Save luciancaetano/c45f9bcdc161f7340c4121679dea8be9 to your computer and use it in GitHub Desktop.
Save luciancaetano/c45f9bcdc161f7340c4121679dea8be9 to your computer and use it in GitHub Desktop.

Revisions

  1. @prasanthj prasanthj revised this gist Oct 20, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions lirc-pi3.txt
    Original file line number Diff line number Diff line change
    @@ -52,8 +52,8 @@ $ sudo cp ~/lircd.conf /etc/lirc/lircd.conf
    $ sudo /etc/init.d/lircd start

    # you can test if the recorded remote works by
    $ irsend SEND_ONCE bose KEY_POWER
    $ irsend SEND_ONCE bose KEY_VOLUMEUP
    $ irsend SEND_ONCE <device-name> KEY_POWER
    $ irsend SEND_ONCE <device-name> KEY_VOLUMEUP

    [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/
  2. @prasanthj prasanthj revised this gist Oct 20, 2017. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions lirc-pi3.txt
    Original file line number Diff line number Diff line change
    @@ -51,6 +51,9 @@ $ sudo mv /etc/lirc/lircd.conf /etc/lirc/lircd_original.conf
    $ sudo cp ~/lircd.conf /etc/lirc/lircd.conf
    $ sudo /etc/init.d/lircd start

    # you can test if the recorded remote works by
    $ irsend SEND_ONCE bose KEY_POWER
    $ irsend SEND_ONCE bose KEY_VOLUMEUP

    [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/
  3. @prasanthj prasanthj revised this gist Oct 20, 2017. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions lirc-pi3.txt
    Original file line number Diff line number Diff line change
    @@ -40,6 +40,17 @@ pulse 560
    space 1706
    pulse 535

    # to record a custom remote/register a remote device
    $ sudo /etc/init.d/lircd stop
    $ sudo irrecord -d /dev/lirc0 ~/lircd.conf
    # follow the instruction prompted by the above command carefully
    # at the end ~/lircd.conf file will be generated

    # backup the original lircd.conf
    $ sudo mv /etc/lirc/lircd.conf /etc/lirc/lircd_original.conf
    $ sudo cp ~/lircd.conf /etc/lirc/lircd.conf
    $ sudo /etc/init.d/lircd start


    [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/
  4. @prasanthj prasanthj revised this gist Oct 16, 2017. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions lirc-pi3.txt
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    - 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.
    Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]).
    The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch.
    Following are the changes that I made to make it work.

    $ sudo apt-get update
    $ sudo apt-get install lirc
  5. @prasanthj prasanthj revised this gist Oct 16, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lirc-pi3.txt
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ $ 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>
    <press a key in remote and you should see multple lines like below>
    pulse 560
    space 1706
    pulse 535
  6. @prasanthj prasanthj created this gist Oct 16, 2017.
    44 changes: 44 additions & 0 deletions lirc-pi3.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    - 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/