impossible de changer volume sur shield adafruit musicmaker

salut,

je n’arrive pas à modifier le volume sur mon shield adafruit (musicmaker) et ne vois pas ce qui cloche… :confused:

merci du coup de main.

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

#define BREAKOUT_RESET  9      // VS1053 reset pin (output)
#define BREAKOUT_CS     10     // VS1053 chip select pin (output)
#define BREAKOUT_DCS    8      // VS1053 Data/command select pin (output)

#define SHIELD_CS     7      // VS1053 chip select pin (output)
#define SHIELD_DCS    6      // VS1053 Data/command select pin (output)

#define CARDCS 4     // Card chip select pin
#define DREQ 3       // VS1053 Data request, ideally an Interrupt pin

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

int led = 3, btn1 = 1, btn2 = 2, volume = 1;

int maxTrack = 2;
char* songs[] = {"001.mp3","002.mp3"};

int songNumber = 1;

void setup() {
  Serial.begin(9600);
  Serial.println("RadioMobile + Bru'Surf say u Hello asshole :p");

  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- mrd"));
  
  SD.begin(CARDCS);    // initialise the SD card
  // Set volume for left, right channels. lower numbers == louder volume!
  musicPlayer.setVolume(volume,volume);
  
  musicPlayer.sineTest(0x44, 500);    // Make a tone to indicate VS1053 is working
  
  musicPlayer.GPIO_pinMode(led, OUTPUT);
  musicPlayer.GPIO_pinMode(btn1 , INPUT);
  musicPlayer.GPIO_pinMode(btn2, INPUT);

  musicPlayer.useInterrupt(VS1053_FILEPLAYER_PIN_INT);

 // musicPlayer.startPlayingFile(songs[songNumber]);
musicPlayer.startPlayingFile(songs[songNumber]);
}
void loop() {
  if (musicPlayer.GPIO_digitalRead(btn1) == HIGH) {
    LED();
    prev();
    delay(500);
  };
  if (musicPlayer.GPIO_digitalRead(btn2) == HIGH) {
    LED();
    next();
    delay(500);
  };

}
void LED() {
  musicPlayer.GPIO_digitalWrite(led, HIGH);
  Serial.print("led"); delay(1000);
  musicPlayer.GPIO_digitalWrite(led, LOW);
}
void prev() {
  if (songNumber - 1 >= 0)
  {
    songNumber = songNumber - 1;
  }
  else
  {
    songNumber = maxTrack - 1;
  }
  Serial.println(songNumber);
  musicPlayer.startPlayingFile(songs[songNumber]);

  delay(500);
}
void next() {
  if (songNumber + 1 < maxTrack)
  {
    songNumber = songNumber + 1;
  }
  else
  {
    songNumber = 0;
  }
  Serial.println(songNumber);
  musicPlayer.startPlayingFile(songs[songNumber]);
  delay(500);
}
void UP(){if (volume < 70)
    {
      volume = volume + 1;
      musicPlayer.setVolume(volume, volume);
      delay(50);
    }}
void DOWN(){ if (volume > 0)
    {
      volume = volume - 1;
      musicPlayer.setVolume(volume, volume);
      delay(50);
    }}