This subject seems to be pretty popular but I cannot seem to find an answer to my issue. I am hoping someone can assist. I am new to Arduino and just got an Uno R3 and I am trying to play a .wav song from an SD card through an 4ohm 3 watt speaker. I have ran the Cardinfo sketch example in IDE and the SD card is being recognized and read but when I run try to run the sketch to play the song I get an "SD fail" message. I have included the code, the Cardinfo script, type of SD card module I have, and an attempt to show wiring (with Tinkercad) which I could not find an animation for the SD card so I just showed wiring.
#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(5);
tmrpcm.play("jugg.wav");
}
void loop() {
}
Please help. I have reviewed quite a few forums and dove into YouTube and I am still unable to find a solution. Thank you!