getting an mp3 shield to work

hey all! i am a total noob, but i have no idea how to set up my mp3 shield.

I found some things on the internet about a SdFat library or something. i installed it but it isn't working. Can anyone help me?

Maybe, if you say what Arduino you're using and provide a link to your particular "mp3 shield". And if you've written some code it would be good to see that too.

Steve

You'll have to check the documentation for your shield. If you bought it from SparkFun or Adafruit, they usually have very good documentation and examples. If you bought something "cheap" on eBay, it may be more difficult.

I found some things on the internet about a SdFat library or something.

No, you don't need anything like that... The Arduino doesn't read the audio files. The SD card plugs-into the MP3 shield and the firmware built-into the MP3 shield takes care of reading (and playing) the file.

Hey thanks for your reply,
i have an arduino uno and i have a adafruit music maker.

Honestly i have no idea how to do this. And i know i am doing some weird stuff but i am trying to figure it all out!

This is the code i got. I am trying to play a certain audio file when a button is pressed.

// constants won't change. They're used here to
// set pin numbers:
#include <SPI.h>
#include <SdFat.h>
#include <SFEMP3Shield.h>                                                                                   

SdFat sd;
SFEMP3Shield MP3player;

const int buttonPin1 = 3;     // the number of the pushbutton pin
const int ledPin1 =  13;      // the number of the LED pin
const int buttonPin2 = 2;     // the number of the pushbutton pin
const int ledPin2 =  12;      // the number of the LED pin
const int buttonPin3 = 4;     // the number of the pushbutton pin
const int ledPin3 =  11;      // the number of the LED pin
const int buttonPin4 = 5;     // the number of the pushbutton pin
const int ledPin4 =  10;      // the number of the LED pin
const int buttonPin5 = 6;     // the number of the pushbutton pin
const int ledPin5 =  9;      // the number of the LED pin



void setup() {
  // initialize the LED pin as an output:
  pinMode(ledPin1, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin1, INPUT);
  pinMode(ledPin2, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin2, INPUT);
  pinMode(ledPin3, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin3, INPUT);
  pinMode(ledPin4, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin4, INPUT);
  pinMode(ledPin5, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin5, INPUT);


  
}

void loop() {

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
 if (digitalRead(2) == HIGH) {
    // turn LED on:
    digitalWrite(ledPin2, HIGH);

  } else {
    // turn LED off:
    digitalWrite(ledPin2, LOW);
  }

   if (digitalRead(3) == HIGH) {
    // turn LED on:
    digitalWrite(ledPin1, HIGH);
  } else {
    // turn LED off:
    digitalWrite(ledPin1, LOW);
  }

   if (digitalRead(4) == HIGH) {
    // turn LED on:
    digitalWrite(ledPin3, HIGH);
  } else {
    // turn LED off:
    digitalWrite(ledPin3, LOW);
  }

   if (digitalRead(5) == HIGH) {
    // turn LED on:
    digitalWrite(ledPin4, HIGH);
  } else {
    // turn LED off:
    digitalWrite(ledPin4, LOW);
  }


   if (digitalRead(6) == HIGH) {
    // turn LED on:
    digitalWrite(ledPin5, HIGH);
    MP3player.stopTrack();
    MP3player.playTrack(1);
  } else {
    // turn LED off:
    digitalWrite(ledPin5, LOW);
  }

 
}

There are lots of links for that shield and lots of types of that shield. Which one do you have. You were requested to post a link.

Search for:- adafruit music maker for lots of information and also videos.

How have you formatted your SD card?

How have you wired your push button? With a pull down resistor? Have you tested that the button works?

How have you wired your LEDs?