I had a supposed YX5300 with GD3300D chip (16 pins), and as a copycat, while it can play tracks, it'd halt my entire program after certain points.
Then I bought a new one, from a store that I've bought a completely working YX5300 (where files play almost instantaneously), but this one is written v.1.1, with "OPEN SMART", and has "JC/JL" IC, AA1641CJ691F. 1-94:
But unlike the YX5300 I bought before in that store, this one also doesn't work well like said copycat above. Are there any ways to make this version work (e.g. I read both TX and RX pins has to be given 1K ohm resistor for JL/JC pins), or I really have to buy the original YX5300 one, regardless of pin numbers? Or the issue lie in the SD card that I use, like it has to fit certain requirements? (I use V-Gen MicroSDHC 4 GB)
The actual YX5300 pin ones is hard to look for, most stores sell the fake copycat ones, only that store I know that I've bought ones that worked.
I use the DFRobotDFPlayerMini library code to play the MP3 files with these.
As you say it can play tracks, telling me the mp3 player is fine.
I suspect there's something wrong in your code, or your wiring, or your power supply. As it's "after certain points" I'd suggest you have a good look at those points in your code.
Eh, to be specific, it halts the program after it was able to play before. So it's the same point, being repeated, first one works, second time (as well as any other sounds) not.
It doesn't work like the first YX5300 I bought from that store.
To explain more, said variant of module I use had the first play working, albeit the program halted a bit before playing the sound. But when said command is repeated, the program stops and freezes. Seems like a problem in serial communication (there are indeed reports about other chips like MH2024K, or JL ones, having the problem working with the serial port, but my previous YX5300 that also has JL chip, though with different AAxxxx code, works well).
There's no shop around my place that sells actual YX5200/YX5300/YX6300 chip.
You can try examples from this library (https://github.com/MajicDesigns/MD_YX5300), or load from the Library Manager, to see if the problem is in the device or in your code.
Using that library, it does work better for my module, where it always plays the track it's assigned to. But, anytime it attempts to play a track it still halts the program a bit, are there solutions for this or it's hardware problem? My general code program would be like this:
#include <MD_YX5300.h>
MD_YX5300 mp3(Serial);
void setup()
{
Serial.begin(9600);
mp3.begin();
}
void loop()
{
//commands to play here (e.g. if conditions)
{
mp3.playTrack(#); //# = the track number required for my code
}
//another commands to play
{
mp3.playTrackRepeat(#); //# = the track number required for my code
}
//command when all of that ends
{
mp3.playStop();
}
}
So I've solved it by moving the serial port of my YX5300 from pins 0 and 1 of Arduino Mega to pins 14 and 15 (TX3 and RX3).
By this, would the default serial become more problematic if my sketch uses a large amount of program storage space, thus I needed to move my YX5300 to different serial port pins?