Hello all. Been a while since I tinkered with my Arduino stuff, so bear with me.
Dug out an old MP3 module the other night. I think they are pretty obsolete now. Its an MDFly AU5106.
I have attached the PDF.
I have it connected to a Mini Pro 5v.
This is my trial code so far. It seems to have loading issues with the default serial comm ports, so I am using SoftwareSerial to allocate new ones (I have tried it with the default ones and no change).
#include <SoftwareSerial.h> //Allows me to use other pins for serial comms
SoftwareSerial mySerial(3, 4); // RX, TX
int MP3status = digitalRead(3);
void setup(){
mySerial.begin(9600); //Set baud rate
Serial.begin(9600); //Open the serial port screen for debugging
delay(100);
mySerial.write(0x01); //Play track 1
//mySerial.write(0xE0); //Repeat function - this works (toggle)
do {}
while (digitalRead(3)<>0xFF);
Serial.println(MP3status);
delay(1120); //Delay long enough for track 1
mySerial.write(0x02); //Play track 2
delay(850); //Delay long enough for track 2
mySerial.write(0x03); //Play track 3
delay(750); //Delay long enough for track 3
mySerial.write(0x04);` //Play track 4
}
void loop() {}
OK. The problems are as follows...
I can play a track as needed. Send the track number and it plays. I have to put a delay between the play commands slightly longer than the MP3 file, so they play sequentially (they are voice commands that join together to make a sentence).
The volume commands don't appear to work at all (0xE8 and 0xE9).
The repeat/single play command however does work.
Nothing seems to return on the RX pin. I want to read the RX pin as a busy line so I can use that to trigger the next MP3 file and not rely on various length delays.
The 'do' loop in the middle doesn't do anything (and I have tried many formats), as its not reading the returned serial value.
If is supposed to return 0xFF at the end of each file I believe.
Tried tying the comms lines high (and low) with a 10k... no change.
Hmmm, any ideas?
AU5106_spec.pdf (55.9 KB)