Mangetic Door Sensor with LED and Audio from SD Card

So the subject pretty much says what I am trying to do.

I have the speaker to digital 3 and ground.

The SD Reader is wired with CLK to digital 7.

The LEDs are working splendidly.

The sensor is wired from digital 2 and ground.

I am using an UNO

I am new at all of this and have completely hit a wall.

The following is the coding. When I have the serial Monitor up it is telling me that the SD Fails.

Any insight would be greatly appreciated.

Thanks.

#include <SD.h>
#include <TMRpcm.h>
#include <SPI.h>

const int switchPin = 2;
const int ledPin = 13;
const int speakerPin = 3;
const int SDPin = 7;
TMRpcm TMRpcm;

void setup() {
pinMode(switchPin, INPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(switchPin, HIGH);
}

void loop() {
if(digitalRead(switchPin) == LOW){
digitalWrite(ledPin, LOW);
}

else{
digitalWrite(ledPin, HIGH);

TMRpcm.speakerPin=3;
Serial.begin(9600);
if(!SD.begin(SDPin))
{
  Serial.println("SD fail");
  return;
}
TMRpcm.setVolume(8);
TMRpcm.play("lastime.wav");
}
}

SD & SDFat both need to use the hardware SPI pins to talk to the SD card.
SCK on 13, MISO on 12, MOSI on 11. And a slave select pin.
D10 needs to be an Output for the Arduino to be SPI master - if D10 is an Input, and it goes low, the Arduino becomes an SPI slave and may act like it's hung. A different pin may be used for slave select. I always use 10 as the first choice as it has to be an output anyway.

Thank you. I have switched it so the sck is on digital 13 and the LED output is digital 7. The LEDs are working properly still. I still do not have the sound though.

I have the slave select on digital 10, as recommended.

I am still getting the SD Fail message on the serial monitor.

Is there some error in my coding that I have not found?