ModMyPi LTD | Head Case OpenELEC IR Receiver Setup
von Satoshi Nakamoto

This is just a little tutorial on setup an IR Receiver on OpenELEC/Kodi in aspect certainly one of our Head Case's
Activate Gadget Tree Overlay
First we have to edit our config.txt file. To do that, we have to make the flash listing writable:
mount -o remount,rw /flash
Now we will edit the config.txt inside this listing
nano /flash/config.txt
That you must add the next to the top of the config.txt
dtoverlay=lirc-rpi
As soon as we now have completed modifying config.txt be certain to make the flash listing read-only once more.
mount -o remount,ro /flash
Time to reboot to make our config modifications lively.
reboot
Connecting the IR Receiver
As soon as we now have enabled the system tree overlay, we have to hook up our IR receiver to the Pi. Each time you might be plugging issues into the GPIO of the Pi, all the time be certain the Pi is powered OFF, as to not brief out something and harm the Pi.
Begin by shutting down the Pi
halt
IR Receivers include a semiconductor/chip inside them, in order that they should be powered not directly (all the time verify the datasheet on your particular receiver) earlier than they are often examined. On this case, the receiver could be powered by 5V

Now utilizing three feminine to feminine jumper wires, connect your IR receiver to your Pi:
Pin 1 is DATA, goes to RPi pin 12 (GPIO 18)
Pin 2 is GND, goes to RPI pin 6 (GROUND)
Pin three is POWER, goes RPi pin 1 (5V)

If in case you have totally different receiver you'll have totally different pinout. Test the datasheet for you receiver.
With the receiver related, we now have to run the wires out by just a little hole in the back of the case, in order that the IR receiver is on the skin of the case.


Utilizing a little bit of tape, stick the IR Receiver to the again of the case, ensuring that it’s dealing with in direction of the entrance of the case. In case you are utilizing the TSOP382, then the aspect with the little lump on it's the entrance.


Testing the IR Receiver
To verify if the IR Receiver is engaged on the Pi, merely run the next instructions one after one another:
modprobe lirc_rpi
killall lircd
mode2 -d /dev/lirc0

Now, whenever you press buttons in your distant, assuming your receiver is related appropriately, it is best to see one thing resembling this seem on the display screen with every press:

If nothing occurs whenever you press buttons in your distant, please verify the next:
Be sure the IR Receiver has been related to the Pi appropriately
Be sure the distant is working (strive a distinct distant when you have one, change the batteries and so forth...)
Recording your distant
Earlier than going by this course of, take a look right here: http://lirc.sourceforge.internet/remotes/ and see in case your distant has already had a lircd.conf created for it. If it has, then copy the lircd.conf file to this listing: /storage/.config/lircd.conf and reboot. It's best to now have a working distant!
(In the event you discover the lircd.conf you have got downloaded has incorect KEY mappings, then you may document your individual)
Very first thing to do is to get the record of KEY instructions which can be accepted.
To do that, run the next instructions (bear in mind to repeat the record that you simply get and put it aside someplace, as you will want them later)
killall lircd
irrecord --list-namespace | grep KEY
After getting saved this record you might be able to document your distant.
To document your distant, run the next instructions
killall lircd
irrecord /storage/.config/lircd.conf
Observe the directions given by irrecord precisely.
If you get to the bit the place you might be requested "Please enter the title for the subsequent button (press to complete recording)"
That is the place you begin to configure every button.
So decide a button on the distant you wish to configure, for instance on our IR Distant Management, the primary button is the Quantity Down button.
So we have to discover the KEY command that we wish to affiliate with the Quantity Down button. On this case, it is smart to make use of the KEY_VOLUMEDOWN key. You'll be able to nonetheless configure any KEY command to any button.
After getting discovered the KEY command for the button you need configure, merely enter that KEY and hit ENTER, it is best to now be prompted to press and maintain the button on the distant you wish to assign to this KEY.

Now try this for each button you wish to use on the distant.
After you have got configured the final button, merely hit ENTER to cease recording.
You will then be requested to repeatedly press an arbitary button as quick as you may (be sure to press the identical button every time, and that you do not maintain the button down).
The recording has now been accomplished, and hopefully our lircd.conf has been created (this may be discovered right here: /storage/.config/lircd.conf)
Now all that’s left to do is reboot, then you can begin utilizing your distant management!
reboot
Read the full article
Satoshi Nakamoto
Keine Verbindung
Verbindung wird wiederhergestellt
Etwas ist schiefgelaufen
Wir sind gleich wieder da