0304-02 MP3 Playback

Example Projects > 0304 External Programs > 0304-02 MP3 Playback

Run mp3 file using REXYGEN

This folder contains the source files for running a music file within REXYGEN on a Linux target (incl. Raspberry Pi).

Prerequisites

  • REXYGEN Runtime Core and Advanced function blocks must be installed and running on target device to run the example
  • omxplayer installed (or any other mp3 player)
  • Mp3 file stored on target device

Timing of the project

The algorithm runs each 500 milliseconds (0.5 s). See the EXEC function block,
tick x ntick0 = 0.05 x 10 = 0.5 s

Running the examples

  • The *exec.mdl file is the project main file. Open with REXYGEN Studio.
  • Edit EPC parameter "cmd" according to the absolute path of desired mp3 file.
  • Compile and download project to the target device.
  • Change MP_TRIGGER:BSTATE to ON in Watch mode and listen to the music.

Documentation

Additional information

  • Visit the REXYGEN webpage for more information about the example projects and developing advanced automation and control solutions using REXYGEN.