A great & very cheap MP3 sound module without need for a library!

For those who are following this old-ish thread…

Searching for a way to use the ‘advertise’ method to pause playback, I found this library with a great example of how to accomplish just that. I’m able to set the MP3 playback to music and when an alert is needed, pause the playback, play the alert notification and resume playback (in software versus the hardware example in the link).

fadeTimer = millis();
int currentState = MP3.readState();
if(currentState == 512)  // returns 512 if no song is playing
{
  Particle.publish("pushover", String(currentState));
  MP3.playFolder(0x00, 0x02);
}
else
{
  Particle.publish("pushover", String(MP3.readState()));
  MP3.advertise(2);
  while(millis() - fadeTimer < 3000) // yeah it blocks, but for my project... it is fine
  {
    //Particle.process(); // not needed here
  }
  MP3.stopAdvertise();
}

If I get the time I may port the library (really nothing to it; switching from software serial to Serial1 on the Photon) and put up some better examples.

This little MP3 player is the tits… add some sound to your projects for less than $2.00. Thanks @FiDel for posting this and be sure to check out the library if you are using this player.

8 Likes