MP3 Shield (geeetech)

created: 05 Jul 2013 04:22
tags:

VS1053 MP3 Shield by geeetech. Here's a basic code for stop & playing music.

mp3%20shield.JPG
Geeetech MP3 Shield here in Arduino Lab - Bigfoot
#include <SPI.h>
#include <SdFat.h>
#include <SdFatUtil.h> 
#include <SFEMP3Shield.h>
 
SdFat sd;
SFEMP3Shield MP3player;
 
void setup() 
{
  Serial.begin(9600);
  Serial.println("setup");
 
  //start the shield
  sd.begin(SD_SEL, SPI_HALF_SPEED);
  MP3player.begin();
 
  MP3player.playTrack(1); // play track 1 for 5 seconds
  delay(5000);
 
  MP3player.stopTrack();
  MP3player.playTrack(2); // play track 2 for 2 seconds
  delay(2000);
 
  MP3player.stopTrack();
  MP3player.playMP3("track001.mp3"); // play track by file name.
}
 
//do something else now
void loop() 
{
 
  Serial.println("Kendro!");
  delay(2000);
 
}

Links: http://www.billporter.info/2012/01/28/sparkfun-mp3-shield-arduino-library/comment-page-1/#comments
Library: MP3 Shield Library
Tracks: mp3.zip

The only thing though is that the whole library eats up 1kb of RAM already. So it is recommended to use a MEGA board (with 2560)
if used in larger applications.

Comments: 0