• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoArduino-ish ProgramGPIOGet IR Keypad Value by Linker infrared receiver on ...
Previous Next

Get IR Keypad Value by Linker infrared receiver on pcDuino

Posted by: Alvin Jin , March 30, 2014

[vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”Parts List” tab_id=”1396167281-1-64″][vc_column_text]

  1. 1 x [bigcommerce link=”/pcduino-v2-an-minipc-with-arduino-headers-ubuntu-android-google/” target=”_blank”]pcDuino V2 [/bigcommerce]
  2. 1 x Infrared Controller  *1
  3. 1 x Linker Infrared Receiver Module
  4. Several Jumper wires

IR1[/vc_column_text][/vc_tab][vc_tab title=”Wire Diagram” tab_id=”1396167281-2-73″][vc_column_text]

  1. Linker Infrared Receiver  VCC  => pcduino +3v
  2. Linker Infrared Receiver  GND =>  pcduino GND
  3. Linker Infrared Receiver  OUT  => pcduino D11

Note: You can use  [bigcommerce link=”/base-shield-of-linker-kit-for-pcduino-arduino/” target=”_blank”]Linker base Shield [/bigcommerce] for easier connection.

ir2[/vc_column_text][/vc_tab][vc_tab title=”Installation ” tab_id=”1396168587331-2-6″][vc_column_text]Install relevant software

$ sudo apt-get update && sudo apt-get install pcduino-linux-header-3.4.29+

$ git clone https://github.com/liaods/modules

If you did have git, you need to install it first.

$ sudo apt-get install git-core
  • compile

Compile the downloaded file mod

$ cd /home/ubuntu/modules

$ make M=`pwd` -C /usr/src/linux-headers-3.4.29+/

Load the infrared module

$ sudo insmod ir-keypad.ko pin=11

pin=11 means Linker Infrared Receiver connected to GPIO11, you can choose the GPIO from GPIO0-4 or GPIO 7-17. Without pin=xx, the default is 8[/vc_column_text][/vc_tab][vc_tab title=”Test” tab_id=”1396169019384-3-7″][vc_column_text]Receive the key value:

$ sudo cat /proc/kmsg

ir3

Source has 32 bit, for example 0xe619ff00, the top 8 bit (e6) is data code, the next 8 bit (19) is Anti-code, the last 16 bit (ffoo) is user code.

Note: The same  infrared controller has the same user code. Different controller has the different code, you can modify the remote.h file under /home/ubuntu/modules/pcduino-ir-keypad

ir4[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]

Tags: GPIO

Share!
Tweet

Alvin Jin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors