Hi,
Right to the topic:
I use the following code:
The code is actually really long "FilePlayer" but I minimized it to minimum required logic
to play a single mp3 file.
#include <SPI.h>
#include <SdFat.h>
#include <SdFatUtil.h>
#include <SFEMP3Shield.h>
#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>
#endif
SdFat sd;
SFEMP3Shield MP3player;
int16_t last_ms_char; // milliseconds of last recieved character from Serial port.
int8_t buffer_pos; // next position to recieve character from Serial port.
char buffer[6]; // 0-35K+null
void setup() {
uint8_t result;
Serial.begin(115200);
//Initialize the SdCard.
if(!sd.begin(SD_SEL, SPI_FULL_SPEED)) sd.initErrorHalt();
// depending upon your SdCard environment, SPI_HAVE_SPEED may work better.
if(!sd.chdir("/")) sd.errorHalt("sd.chdir");
result = MP3player.begin();
MP3player.playTrack(1);
}
void loop() {}
SFEMP3Shield Library
IDE 1.0.5 (Tried others but got compilation errors)
I use the following module:
http://www.geeetech.com/wiki/index.php/VS1053_MP3_breakout_board_with_SD_card
smaller chinies version of the actual shield.
I tried to use the example provided but couldn't make it work as well the SFEMP3Shield lib. seems identical.
What happens is that I get my module to play the mp3 file, the problem is that
the file audio seems to struggle playing, low speed with high noises
Components:
4Ohm speaker
32Gb SDCard, FAT32 Format
*.mp3 File.
Arduino Uno
Could someone help, seems like the module is working but the audio is horrible.
I thought it's a Ram problem but duno, the audio it's like hardly trying to play that's what I mean
by low speed, like ram is not enought or I don't know what is the cause.
Any advice, help would be appreciated
Thanks,
D60