programming question ' VS1053b + uno ' please I need your help

Hi

I’ve been trying to get the ultrasonic sensor to work with the VS1053b

what I want is that controlling the music (on& off) depending on the distance measured
by the ultrasonic sensor!

I am using an arduino uno + music shield VS1053b

this is the code i tried , but not have worked!

i wonder if anyone can direct me as to where i am going wrong.

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

#define BREAKOUT_RESET  9    
#define BREAKOUT_CS     10    
#define BREAKOUT_DCS    8      

#define SHIELD_RESET  -1      
#define SHIELD_CS     7      
#define SHIELD_DCS    6      

#define CARDCS 4    
#define DREQ 3

Adafruit_VS1053_FilePlayer musicPlayer = 
Adafruit_VS1053_FilePlayer(SHIELD_RESET, SHIELD_CS, SHIELD_DCS, DREQ, CARDCS);

int echoPin=12;
int trigPin=13;
void setup() 
{ 
  Serial.begin(9600);
  Serial.println("Adafruit VS1053 Simple Test");

  if (! musicPlayer.begin()) { // initialise the music player
     Serial.println(F("Couldn't find VS1053, do you have the right pins defined?"));
     while (1);
}  

  Serial.println(F("VS1053 found"));

  SD.begin(CARDCS);
  musicPlayer.setVolume(20,20); 
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
}

void loop() { 
  float duration, distance;
  digitalWrite(trigPin, HIGH);
  delay(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = duration/58; 
  Serial.print(distance);
  Serial.println("cm"); 
  if( 5 < distance || distance < 20 ) 
  {  
  musicPlayer.playFullFile("track001.mp3");
  }
  else
  { 
   musicPlayer.pausePlaying(true);
  }
    delay(100);
}

this is the code i tried , but not have worked!

The code did work. It did something.

You need to tell us what it actually did, and how that differs from what you want.

I wanted music playing by the distance measured by the ultrasonic sensor.

I mean if the distance between user's hand and the arduino is 10cm, music plays. also if the distance is more than 20cm, music stops

but music didn't play and any distance wasn't measured.

only this message showed up on the screen, "Couldn't find VS1053, do you have the right pins defined?"

I don't know what was wrong.