DuinoMite controls MP3 player – Add voice and music to your embedded projects


Image
MOD-MP3-X is smart MP3 player build with VS1053 MP3 decoder and STM32F103RBT6 Cortex M3 microcontroller. It can work in two modes – stand alone MP3 player and Smart MP3 player controllable via RS232. In stand alone mode you can control MOD-MP3-X with slide switch to play/stop forward/reverse and increase / decrease the volume.

In Smart MP3 mode you can load MP3 files on the MOD-MP3-X SD-card if you connect with USB to computer, or you can send commands via RS232.

To play file with Duinomite is very simple you just have to send to MOD-MP3-X via RS232 this message: “PSONGNAME FILE.MP3″ and to stop it you should send “C”

MOD-MP3-X responds to the commands and you can play with the different commands using this simple BASIC code:

10 OPEN “COM3:9600″ AS #1 ‘open UEXT RS232 port
20 INPUT “CMD: “,CMD$ ‘ask for command
30 PRINT #1, CMD$+CHR$(13); ‘send to MOD-MP3-X + CR
35 PAUSE 300 ‘wait the command to be executed
40 IF EOF(1) THEN 20 ‘if there is response from the MOD-MP3
50 PRINT INPUT$(1,1); ‘read and print it
60 GOTO 40 ‘loop forever

with this code you can check all commands which are written in MOD-MP3-X user manual and see what they do.

OK then let’s write small code which plays the song “DUHAST.MP3″ from my SD card when I press DuinoMite-Mini user Button, then to stop the song when the button is pressed again .

the code is:

10 OPEN “COM3:9600″ AS #1 ‘open UEXT RS232 port
20 PRINT “PRESS THE USER BUTTON TO PLAY DUHAST.MP3″
30 DO: PAUSE 100: LOOP UNTIL PIN(0)=1 ‘wait button to be pressed
40 PRINT #1, “PSONGNAME DUHAST.MP3″ ‘start playing the song
50 PAUSE 1000 ‘wait 1 second
60 PRINT “PRESS THE USER BUTTON AGAIN TO STOP THE SONG”
70 DO: PAUSE 100: LOOP UNTIL PIN(0)=1 ‘wait button to be pressed
80 PRINT #1, “C” ‘stop playing the song
90 CLOSE #1

Here is link to video which show how this program runs: http://youtu.be/kW_vReFMhkUImage

3 Comments (+add yours?)

  1. Samuel
    Mar 03, 2012 @ 12:18:52

    i’m having problem with this mp3 mod, it seems to function in standalone mode. but when i try it in uext mode, no sound even the red power light seems dim.
    -i’m using duinomite board
    -mod-mp3

    can you please provide the jumper settings to run the program.
    what power option can i use(battery/uext/ac adaptor)?

    Reply

    • OLIMEX Ltd
      Mar 03, 2012 @ 12:33:35

      please do not use this blog to discuss technical problems, send e-mail to support@olimex.com for technical issues and help, provide info about what power supply do you use which version of the Duinomite firmware etc, all jumper settings are explained in the MOD-MP3-X datsheet, there is issue with the serial ports on some DM firmware, make sure you have the latest programmed

      Reply

  2. Cornell Mcsharry
    Nov 07, 2012 @ 12:54:41

    Mp3 players these days have so many features and additional gadgets. ‘

    Most up to date article straight from our own web-site
    http://www.prettygoddess.com

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 457 other followers

%d bloggers like this: