0

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

Bex
  • 2,929
  • 3
  • 25
  • 34
harveyslash
  • 179
  • 1
  • 3
  • 15
  • Does http://raspberrypi.stackexchange.com/questions/27073/firmware-3-18-x-breaks-i2c-spi-audio-lirc-1-wire-e-g-dev-i2c-1-no-such-f/27074#27074 apply? – joan Mar 10 '15 at 08: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 08: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 09:34

1 Answers1

2

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

harveyslash
  • 179
  • 1
  • 3
  • 15