AU5106 MP3 module

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)

SoftwareSerial mySerial(3, 4);	        // RX, TX

int MP3status = digitalRead(3);

Why are you reading a serial pin to determine status? Why are you doing it before the hardware is ready?

do {}
while (digitalRead(3)<>0xFF);

The not equal operator is !=. digitalRead() will return 0 or 1. Both are not equal to 0xFF, so your infinite loop will never end.

The volume commands don't appear to work at all (0xE8 and 0xE9).

Perhaps because your code doesn't send them.

Nothing seems to return on the RX pin.

How would you know? You never read it properly. You would use mySerial.available() and mySerial.read(). Of course, mySerial is a stupid name, but that's beside the point for now (although I'll keep pointing that out until you use a meaningful name for the instance).

Well that is why I am asking. I don't understand this stuff entirely.
mySerial was the name I lifted off some Arduino code I found... its not my naming.

The volume command is being sent in the same format as the play command, so I cannot see why it doesn't work.

I tried mySerial.read and that fails too.

Perhaps try being a little more helpful to people less skilled than yourself and not such a smartarse

I will figure it out for myself

mySerial was the name I lifted off some Arduino code I found... its not my naming.

It IS the name in the code YOU posted. That makes it YOUR name, Mr. myArduinoOwner.

The volume command is being sent in the same format as the play command, so I cannot see why it doesn't work.

Which line number, in the code you posted, does that happen on?

I tried mySerial.read and that fails too.

Which line number, in the code you posted, does that happen on?

Really helpful. Absolutely no part of your answers were any help

Not everybody posts completed, working code. If I knew what I was doing, I wouldn't be asking for help.

Anyway, problem solved without your useless input.

Idiot

"Anyway, problem solved without your useless input.

Idiot"

Flows in your code were cleanly and clearly pointed, and you come back with a response like that. Glad you self-signed your message.
Moderator.