There's more...

LIRC supports several helper programs, of which irxevent is just one:

remote

By default, LIRC supports some simple controls; for example:

  prog=remote

  button=KEY_UP

  config=UP

This will provide simple cursor control from a remote (UP, DOWN, LEFT, RIGHT, and also ENTER) that are perfect for simple menu control.

http://www.lirc.org/html/configure.html#lircrc_format

irxevent

Emulates button clicks and key presses within X applications. You can specify that the key event occurs in the CurrentWindow or in a specific window by name, that is, leafpad. This only works if you are running from the graphical desktop environment (or using X forwarding).

http://www.lirc.org/html/irxevent.html

irpty

Converts infrared remote commands into keystrokes for controlling a particular program:

  rog=irpty

  button=KEY_EXIT

  config=x

Start it by specifying the lircrc configuration and program you want to control:

irpty /etc/lirc/lircrc -- leafpad

http://www.lirc.org/html/irpty.html

irexec

Allows commands to be run directly from the remote control:

  prog=irexec

  button=KEY_POWER

  config=sudo halt #Power Down

http://www.lirc.org/html/irexec.html

 

You can test any part of the lircrc file by using ircat with the required prog:

ircat irxevent  

The preceding command will report the following:

Key k CurrentWindow
Key i CurrentWindow  

Finally, if you have a suitable IR Transmitter LED attached (including a protective resistor/switching transistor), you can also use LIRC to send infrared signals from the Raspberry Pi. For this, you can use the irsend command, for example:

irsend SEND_ONCE Goodmans KEY_PROGRAMUP 

The IR output channel is enabled within the /boot/config.txt file (assuming connected to GPIO Pin 19):

dtoverlay=lirc-rpi,gpio_in_pin=24,gpio_out_pin=19  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.240.252