DV Industrial Computer Ltd.
 | News | Products | Support | Ordering |   
TeleServ Simple MP3 file player. Example of using
Simple MP3 file player.

Example is realized on Perl script. Operation of this script is tested in OS SuSE Linux, however they should operate in any other Unix like OS. Interface with the controller is allocated in special module TeleServ.pm. You should copy this file in any directory and you should define environment variable PERLLIB. The easiest way is to add to the file /etc/profile the following string:

    PERLLIB=”the name of your directory”
    export PERLLIB

You can indicate directory where modules would be searched in the script adding at the beginning of the script the following directive:

    use libs “the name of your directory”

Control is handled by buttons of the controller while information about musical composition is displayed as a creeping line on LCD of the controller TeleServ. The script mp3play.pl requires mpg123 (www.mpg123.de) player. Install it to directory "/usr/bin". The MP3::Tag module should also be installed. These packages should be available on CPAN (www.cpan.org). Installing a new module can be as simple as typing (from the root prompt)

    perl -MCPAN -e 'install(MP3::Tag);'

Note, the CPAN.pm documentation has more complete instructions on how to use this convenient tool. Now you can run player, indicating directory with music to play, for example:

    ./mp3play /home/Music

Pressing button “Up” on the controller causes jump to next musical composition, “Down” - on previous, “Right” - stops the playing.

Enjoy!

Home | Contact Us | About Us |