So for my leaving cert construction project, I have decided to make a music box with a basic Arduino mp3 player in it. I've followed a guide online on how to create the circuit and what code to use but no matter what I do I keep getting SD card fail once I upload the code. I've changed the SD card, changed the reader and gone over the file and video over and over to no avail. I've also checked the Forums for information but no one seems to have found a solution to this.
This is the video I'm using as a guide: Audio Player using Arduino with micro SD card || vishal soni - YouTube
And this is the code:
#include "SD.h"
#define SD_ChipSelectPin 10
#include "TMRpcm.h"
#include "SPI.h"
TMRpcm tmrpcm;
void setup()
{
tmrpcm.speakerPin=9;
Serial.begin(9600);
if(!SD.begin(SD_ChipSelectPin))
{
Serial.println("SD fail");
return;
}
tmrpcm.setVolume(6);
tmrpcm.play("test.wav");
}
void loop() {
// put your main code here, to run repeatedly:
}
If anyone can help it would be greatly appreciated I have a few more weeks before this project is due and this circuit is the last step before I'm done.