IR sensors not working consist with mp3 shield vs1053 turned on

When i turn on in the setup the sd.begin my sensors are not working consisted anymore …is this a overload in arduino ?

#include <Wire.h>
#include <SPI.h>
#include <SdFat.h>
#include <SdFatUtil.h> 
#include <SFEMP3Shield.h>

#include <Adafruit_PWMServoDriver.h>
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(0x40);

SFEMP3Shield MP3player;
SdFat sd;
SdFile file;

int afspelen;
int s0 = 8;
int s1 = 9;
int s2 = 10;
int s3 = 11;
int servomin = 180; //150
int servomax = 400; //600
int readingPin = 0;
int controlPin[] = {s0, s1, s2, s3};
int servo;
int check;

void setup() {
  Serial.begin(9600);
  pinMode(s0, OUTPUT);
  pinMode(s1, OUTPUT);
  pinMode(s2, OUTPUT);
  pinMode(s3, OUTPUT);
  digitalWrite(s0, LOW);
  digitalWrite(s1, LOW);
  digitalWrite(s2, LOW);
  digitalWrite(s3, LOW);

    pwm.begin();
    pwm.setPWMFreq(60);
 // afspelen = sd.begin(SD_SEL, SPI_HALF_SPEED);
 // afspelen = MP3player.begin();
 // MP3player.setVolume(0,0);
}

void loop() {
// muxreading();
// waveform();
 people();
 
}

// ------ mux functie
int readMux(int channel){
  int muxChannel[16][4]={{0,0,0,0},{1,0,0,0},{0,1,0,0},{1,1,0,0},{0,0,1,0},{1,0,1,0},{0,1,1,0},
  {1,1,1,0},{0,0,0,1},{1,0,0,1},{0,1,0,1},{1,1,0,1},{0,0,1,1},{1,0,1,1},{0,1,1,1},{1,1,1,1}};

  for(int i = 0; i < 4; i ++){
    digitalWrite(controlPin[i], muxChannel[channel][i]);
     }

  int val = analogRead(readingPin);
  return val;
  }
  
void people(){
  for (servo = 0; servo < 16; servo++) {
    int newwaarde = readMux(servo);
   
    if((newwaarde > 275) && (newwaarde < 500)){
   // track afspelen
   

     for (uint16_t movement = servomin; movement < servomax; movement++) {
       pwm.setPWM(servo, 0, movement);
       delay(5);
     }
  delay(2000);
      Serial.print("Reading sensor ");
      Serial.print(servo);
      Serial.print(" waarde ");
      Serial.println(newwaarde);
    }else{
      pwm.setPWM(servo, 0, servomin);
    }
  }
}

void waveform(){
  check = 1;
  if(check==1){
    for (servo = 0; servo < 16; servo++) {
      pwm.setPWM(servo, 0, servomin);
    }
  }
  check = 0;
  // start wave




 
}

Pin 11 is one of the hardware SPI pins used to access an SD card. Pick a different pin for your mux select.

aa ok thx ..will try something different. Am looking for a reference on which pins are taken by the shield but cant find it online ...

iejun:
aa ok thx ..will try something different. Am looking for a reference on which pins are taken by the shield but cant find it online ...

What does the manufacturer of the shield say?
You can look in the SFEMP3Shield library sources to see that it uses pins 2, 6, 7, and 8 on most Arduino boards. As an SPI device it also use pins 11, 12, and 13 on most Arduino boards and Pin 10 has to be kept as an OUTPUT.
An SD reader is an SPI device so it shares 11, 12, and 13 on most Arduino boards and has a fourth pin for Slave Select. Any free digital pin will work.
The PWM Shield is an I2C/TWI/Wire device which uses A4 and A5 on most Arduino boards.