I want to use LIRC with my new RPI 2. To do that, I followed this tutorial. Basically it is telling me to do the following:

  1. Add this to your /etc/modules file:

    lirc_dev lirc_rpi gpio_in_pin=25 gpio_out_pin=22
    
  2. Change your /etc/lirc/hardware.conf file to:

    ########################################################
    # /etc/lirc/hardware.conf
    #
    # Arguments which will be used when launching lircd LIRCD_ARGS="--uinput"
    
    # Don't start lircmd even if there seems to be a good config file
    # START_LIRCMD=false
    
    # Don't start irexec, even if a good config file seems to exist.
    # START_IREXEC=false
    
    # Try to load appropriate kernel modules LOAD_MODULES=true
    
    # Run "lircd --driver=help" for a list of supported drivers. DRIVER="default"
    # usually /dev/lirc0 is the correct setting for systems using udev DEVICE="/dev/lirc0" MODULES="lirc_rpi"
    
    # Default configuration files for your hardware if any LIRCD_CONF="" LIRCMD_CONF=""
    ########################################################
    
  3. Edit your /boot/config.txt file and add:

    dtoverlay=lirc-rpi,gpio_in_pin=25,gpio_out_pin=22
    

(I've done gpio_in_pin=25, because thats where I want the receiver to be ).

Another thing: I don't have a three pin IR receiver, so I tried to make my own receiver (two pins) like this: One pin is coming from the PI's 5v, going to the collector of the transistor. Another one is coming from the GPIO 25, and the emitter.

But, when I run mode2 -d /dev/lirc0 and press a few buttons on the remote (2cm away from the sensor), I get nothing.

What is wrong ? I have run rpi-update, apt-get upgrade and apt-get update also.

enter image description here

  • Does raspberrypi.stackexchange.com/questions/27073/… apply? – joan Mar 10 '15 at 8:02
  • I've just seen your raspberrypi.org post. It sounds like you have a bit of work to do on the IR receiver side. – joan Mar 10 '15 at 8:20
  • @joan , I didnt understand your first question. Could you please tell me what to do in detail ? as for the hardware, I tried connecting a RED LED to the output of the transistor, and the LED blinks as I press the buttons on my remote. I thought this meant the circuitry is fine. What do I do ? :/ – harveyslash Mar 10 '15 at 9:34
up vote 2 down vote accepted

The answer to this was a very simple (and even dumber) one. It turns out that I was following the model B+'s pinout. The pin number 26 of raspberry pi 2 is somewhere else. I am posting the new pi's pinout here, just for future reference:

enter image description here

  • 1
    Remember to mark the question as answered if you have a solution. – spuder May 17 '15 at 17:38

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.