What format of sd card i should use, in UART serial mp3 music player module?

When i try to play music in Serial UART mp3 player module, i just hear the clicking sound from the speaker and i think it is because my sd card, that formatted to fat32 with 3.8 gb storage.
anyone know how to fix this clicking sound?

#include <SoftwareSerial.h>
#define ARDUINO_RX 2
#define ARDUINO_TX 3
SoftwareSerial myMP3(ARDUINO_RX,ARDUINO_TX);

byte sendBuffer[6];

void selectTFCard(){
  sendBuffer[0] = 0x7E;
  sendBuffer[1] = 0x03;
  sendBuffer[2] = 0x35;
  sendBuffer[3] = 0x01;
  sendBuffer[4] = 0xEF;
  sendUARTCommand();
}

void playSound(byte songNumber){
  sendBuffer[0] = 0x7E;
  sendBuffer[1] = 0x04;
  sendBuffer[2] = 0x41;
  sendBuffer[3] = 0x00;
  sendBuffer[4] = songNumber;
  sendBuffer[5] = 0xEF;
  sendUARTCommand();
}

void stopSound(){
  sendBuffer[0] = 0x7E;
  sendBuffer[1] = 0x02;
  sendBuffer[2] = 0x0E;
  sendBuffer[3] = 0xEF;
  sendUARTCommand();
}

void setplayVolume(byte volum){
  sendBuffer[0] = 0x7E;
  sendBuffer[1] = 0x03;
  sendBuffer[2] = 0x31;
  sendBuffer[3] = volum;
  sendBuffer[4] = 0xEF;
  sendUARTCommand();  
}

void sendUARTCommand(){
  int q;
  for(q=0;q<sendBuffer[1] + 2;q++){
    myMP3.write(sendBuffer[q]);
  }
  Serial.println("command Sent");
  for(q=0;q<sendBuffer[1] + 2;q++){
    Serial.println(sendBuffer[q],HEX);
  }
  delay(25);
}
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.println("UARTserialV2");
  myMP3.begin(9600);
  delay(500);
  selectTFCard();
  setplayVolume(30);
}

void loop() {
  // put your main code here, to run repeatedly:
  int q;
  
  for(q=0;q<4;q++){
    playSound(q);
    delay(4000);
    stopSound();
  }/*
  for(q=0;q<30;q++){
    setplayVolume(q);
    playSound(1);
    delay(2000);
    stopSound();
  }*/
}

Your player defines which format you must use because the player must be able to read it.

What does "clicking sound" mean? Does it always have clicks in the music at random intervals? Does it click only if you select a new song? Does it only play clicks and no music? Does it play clicks every other second?

If the module is an Open-Smart serial MP3 player, which the commands look like, then FAT32 up to 32GB will be ok. On that module song index is not zero-based, try starting from 1.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.