Go Down

Topic: BY8301-16P player won't communicate with my Arduino (Read 244 times) previous topic - next topic

arduinokov

Feb 01, 2019, 09:08 pm Last Edit: Feb 01, 2019, 09:12 pm by arduinokov
Hello,

I am working with the BY8301-16P module. I have uploaded my sounds and it plays fine manually (connecting the pins to ground with a button), but I have not been able to get it to play through my Arduino. I am using an UNO and the attached sketch.

The set up is power to 6
Gnd to 16
Busy (pin 9) connected to Arduino digital pin 3
TX to 7
RX to 8
Speaker wires are connected to 1 and 2

Any help would be greatly appreciated. :)

*/

#include "SoftwareSerial.h"
#include "MP3FLASH16P.h"
MP3FLASH16P myPlayer;

void setup() {
   // Init the player with the busy pin connected to Arduino pin 3
   myPlayer.init(3);
}

void loop() {
   // Plays random files from those named 001 to 010
   myPlayer.playFileAndWait(random(1, 11));
   
   // Same, but at 50% (15/30) volume
   myPlayer.playFileAndWait(random(1, 11), 15);
   
   // Sets the volume back to 100% (30/30) before looping
   myPlayer.setVolume(30);
}



Go Up