Home Forums Sparkfun MP3 Shield Library Support Forum SFEMP3Shield + Arduino Uno + SeedStudio MusicShield v1.13

Viewing 1 post (of 1 total)
  • Author
  • #3252


    I am trying to get your lib working on an Arduino Uno (R2) and SeeedStudio MP3Shield v1.13
    I am using Arduino IDE v1.0.5 on a 64 bits Ubuntu envrionment.
    I first tried what SeeedStudio provides, but it’s for very old versions of Arduino IDE and there are a lot of zip files floating around, it’s hard to pick the right one.

    So far:
    -I edited SFEMP3ShieldConfig.h:
    #define SEEEDUINO 1
    #define USE_MP3_REFILL_MEANS USE_MP3_SimpleTimer

    -Then I compiled MP3Shield_library_demo :
    Binary sketch size: 29,994 bytes (of a 32,256 byte maximum)
    -But I failed uploading it : “Problem uploading to board”… message
    avrdude: stk500_recv(): programmer is not responding

    -So I copied MP3Shield_Library_Demo.ino to MP3Shield_Small_Demo.ino and I mostly commented what I didn’t need to save some space. I got rid of some features and of the help command. It compiles fine :
    Binary sketch size: 27,638 bytes (of a 32,256 byte maximum)
    -And this time I can upload it
    -It complains about the SD card that can’t be initialized:

    -So I edited the example:

    #if 0
    if(!sd.begin(SD_SEL, SPI_FULL_SPEED)) sd.initErrorHalt();
    pinMode(SD_SEL, OUTPUT);
    if(!sd.begin(SD_SEL, SPI_FULL_SPEED)) {
    F_CPU = 16000000
    Free RAM = 865Invalid format, reformat SD.

    But the ‘QuickStart’ example from SdFat can list all the files from this card without any problem.

    -So is the free RAM a problem here?
    -Does it work With Arduino Uno R2?
    -Also, does your lib support MP3Shield v1.x?
    On their website they say that V1.0 and V2.0 are not compatible, so I would expect you to either have flags for each version or to only support a single version of the board.

    Then I tried a modified version of Mp3PlayerButton2 :
    PlayTrack() returns 0 when I start it the 1st time and 1 when I call it on another track
    If I try to call stopTrack(), it just freeze.
    I have track000.mp3 and a track001.mp3 files on the SD card, they’re both encoded at 128kb/s.


    // libraries
    #include <SPI.h>
    #include <SdFat.h>
    #include <SdFatUtil.h>
    #include <SFEMP3Shield.h>

    // Below is not needed if interrupt driven. Safe to remove if not using.
    #if defined(USE_MP3_REFILL_MEANS) && USE_MP3_REFILL_MEANS == USE_MP3_Timer1
    #include <TimerOne.h>
    #elif defined(USE_MP3_REFILL_MEANS) && USE_MP3_REFILL_MEANS == USE_MP3_SimpleTimer
    #include <SimpleTimer.h>

    SdFat sd;

    SFEMP3Shield MP3player;

    void setup() {

    if(!sd.begin(10, SPI_HALF_SPEED)) sd.initErrorHalt();
    if (!sd.chdir(“/”)) sd.errorHalt(“sd.chdir”);



    void loop() {

    // Below is only needed if not interrupt driven. Safe to remove if not using.
    #if defined(USE_MP3_REFILL_MEANS) \
    && ( (USE_MP3_REFILL_MEANS == USE_MP3_SimpleTimer) \
    ||   (USE_MP3_REFILL_MEANS == USE_MP3_Polled)      )

    uint8_t retVal;
    Serial.print(F(“Start Playing first Track  “));
    retVal = MP3player.playTrack(0);

    Serial.print(F(“Start Playing second Track  “));
    retVal = MP3player.playTrack(1);

    I tried to use USE_MP3_Polled :
    #define USE_MP3_REFILL_MEANS USE_MP3_Polled
    It still doesn’t work but it seems to use less RAM:because I’ve 1039 bytes left instead of 865

    Last minute : I switched back to volume = 10 instead of 254 and now I can hear a little something for 1 second, but then it stops.

    Any idea on why it fails?

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.