User Tools

Site Tools


tutorials:cb1:customization:wireless_music_box

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tutorials:cb1:customization:wireless_music_box [2013/11/23 20:10]
soloforce [Player Program]
tutorials:cb1:customization:wireless_music_box [2013/12/23 14:50] (current)
Line 8: Line 8:
  
 ===== Abstract ===== ===== Abstract =====
-Cubieboard series have support for infra-read (IR) support and analog sound ouput. Together with mplayer, Cubieboard could be turned into a great music box. +Cubieboard series have support for infra-red (IR) support and analog sound ouput. Together with mplayer ​& LIRC, Cubieboard could be turned into a great music box. 
 ===== Prerequisite ===== ===== Prerequisite =====
   * A Cubieboard (1,2,3 are ok, theoretically)   * A Cubieboard (1,2,3 are ok, theoretically)
Line 43: Line 43:
 0000070 c0d7 528c 273e 0004 0000 0000 0000 0000 0000070 c0d7 528c 273e 0004 0000 0000 0000 0000
 </​code>​ </​code>​
-Pay attention to digits such as "​0009",​ "​0015",​ yes, they are the remote keycode, and you'd better write them down.+Pay attention to digits such as "​0009",​ "​0015",​ yes, they are the remote keycode, and you'd better write them down. Take notice that these keycodes are hexadecimal value
 ===== Software Installation ===== ===== Software Installation =====
 <​code>​ <​code>​
Line 69: Line 69:
 </​file>​ </​file>​
 ==== LIRC keycode table ==== ==== LIRC keycode table ====
-Edit //​**/​etc/​lirc/​lircd.conf**//​ in your case. The **codes** section should be altered according to your own keycodes definitions.+Edit //​**/​etc/​lirc/​lircd.conf**//​ in your case. The **codes** section should be altered according to your own keycodes definitions, and they are in decimal form.
 <​file>​ <​file>​
 begin remote begin remote
Line 122: Line 122:
 end remote end remote
 </​file>​ </​file>​
 +The above keycode definitions are for the IR remote like this
 +
 +{{:​tutorials:​cb1:​customization:​2013-11-23-202655_433x296_scrot.png?​400 |}}
 ==== LIRC control file ==== ==== LIRC control file ====
 Edit //​**/​etc/​lirc/​lircrc.conf**//​ in your case. Edit //​**/​etc/​lirc/​lircrc.conf**//​ in your case.
Line 209: Line 212:
 If mplayer is starting playing the music, good to go.  If mplayer is starting playing the music, good to go. 
  
 +===== Run LIRC with mplayer =====
 +You can test LIRC with mplayer right now, with //​**irexec**//,​ a convenient tool for running programs via LIRC.
 +  # irexec -d /​etc/​lirc/​lircrc.conf
 +Now, press your IR remote key, enjoy the music comes from Cubieboard.
 +
 +If you would like the program running in a daemon style, add the fowlling line into //​**/​etc/​rc.local**//,​ right before "exit 0".
 +<​file>​
 +sudo /​usr/​bin/​irexec -d /​etc/​lirc/​lircrc.conf
 +## If there is no "​sudo",​ irexec won't work, which is weird.
 +</​file>​
  
 <WRAP noprint> <WRAP noprint>
 {{tag>​Cubieboard Cubieboard2 IR remote music}} {{tag>​Cubieboard Cubieboard2 IR remote music}}
 </​WRAP>​ </​WRAP>​
tutorials/cb1/customization/wireless_music_box.1385208620.txt.gz · Last modified: 2013/12/23 14:50 (external edit)