Maybe everybody knows this already?
The DFPlayer Mini is useable with a USB thumbdrive instead of a microSD.
That's what those USB+ (p14) and USB- (p15) pins are for.
Just wire up a USB socket (receptacle) - to plug your thumbdrive into - and it's ready to go.
I'm doing that with a NanoEvery now.
Pretty much.
I saved a French webpage address, which subsequently bit the dust, remembering that it made it look pretty complicated.
But the other day I figured I'd wire up a socket and see what happens.
This is my test sketch --
#include "DFRobotDFPlayerMini.h"
DFRobotDFPlayerMini player;
void setup()
{
Serial.begin(19200);
Serial.println("uart0 up\r\n");
Serial1.begin(9600); // 0 = tx; 1 = rx
delay(5000);
if (player.begin(Serial1))
{
Serial.println("OK");
// Set volume to maximum (0 to 30).
player.volume(25); //30 is very loud
}
else
{
Serial.println("Connecting to DFPlayer Mini failed!");
}
}
void loop()
{
player.playFolder(1,1);
delay(12000);
player.playFolder(1,2);
delay(12000);
player.playFolder(1,3);
delay(12000);
player.playFolder(2,1);
delay(12000);
player.playFolder(2,2);
delay(12000);
player.playFolder(2,3);
delay(12000);
player.playFolder(3,1);
delay(12000);
player.playFolder(3,2);
delay(12000);
player.playFolder(3,3);
delay(12000);
player.pause();
delay(10000);
}
I noticed that, with the test sketch above, when I started it cold it would miss the first play, just "dead air" for that 12sec. But if I clicked the Reset, it would execute as anticipated.
I made some changes to the setup() ─ adding the last 4 lines
void setup()
{
Serial.begin(19200);
Serial.println("uart0 up\r\n");
Serial1.begin(9600); // tx 0; rx 1
delay(2500);
if (player.begin(Serial1))
{
Serial.println("OK");
// Set volume to maximum (0 to 30).
}
else
{
Serial.println("Connecting to DFPlayer Mini failed!");
}
delay(2500); // keep or cold start will miss first play
player.playFolder(1,1); // keep or cold start will miss first play
player.pause(); // keep or cold start will miss first play
player.volume(18); //30 is very loud
}
The other thing, after it got through the first play through, it would have the volume cranked all the way up.
Maybe it's the thumbdrive (it wouldn't blink as it does otherwise when a track plays) ?
Maybe it's the Every ? Maybe I should try it with "328 Registers" selected.
With the new setup(), it doesn't miss the first play and the volume doesn't change.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

