Adafruit VS1053 (mp3) library for music maker shield ported?

@stoobee, the breathing green means the Photon is neglecting to service the “background” cloud maintenance tasks. Try adding the SYSTEM_THREAD(ENABLED); to the top of the example code to see if the Photon stays connected. :smile:

1 Like

@peekay123 that’s done it! thanks

1 Like

Hi @peekay123 @McTristan great work!

I was trying to get the same working using a Photon, the Adafruit Music Maker Shield and the Shield Shield, but i think the pin mappings of the Shield Shield might be making things more difficult as some of the Music Maker Shield pins are fixed.

These are what they translate to with the Shield Shield (below). Just wondered if you’d tried similar or could think of a work around?

Otherwise I think the breakout might be the best option.

 // These are the pins used for the music maker shield
#define MCS   D7      // VS1053 chip select pin (output)
#define DCS   D1      // VS1053 Data/command select pin (output)

// These are common pins between breakout and shield
#define CCS   D6     // Card chip select pin
// DREQ should be an Int pin, see http://arduino.cc/en/Reference/attachInterrupt
#define DREQ  A7      // VS1053 Data request, ideally an Interrupt pin

#define SCK   D4
#define MISO  D3
#define MOSI  D2
#define SS    A2

@johnnussey, I can’t vouch for the shield version of the VS1053 since I only have a breakout. However, the library is not written to handle SPI1 on the Photon so the pinout will not work without software modifications. I could add a #define for selecting the SPI port to use. :wink:

@peekay123 I would also like to use this audio breakout board with the Photon in the near future.

We just got a new Great Dane puppy and were potty training it. I want to make a button or pressure activated switch that will speak out that the Dog has to go outside. Were going to train it to it the button every time before it goes out.

1 Like

Cheers @peekay123. My breakout just arrived so I’ll give that a go first to get things moving.
A #define for the SPI port would be great though,… mainly because the Photon and Shield version on the Shield Shield is a beautiful sight to behold!

2 Likes

@johnnussey, that IS a lovely site. I’ll try to look at the code today :wink:

1 Like

Hello, just wondering can others get the setVolume function working in the player_simple example? I’ve tried altering the values and it doesn’t seem to have any effect…

I’ve tried the same function with the module and an arduino and there are no the volume changes as expected.

Could it be something to do with SPI?

@stoobee, I haven’t tried it myself but since the SPI works for playing, there is no reason the setVolume() should not work. Are you using a Photon or Core?

@peekay123 makes sense about spi! I’m using a photon…

@stoobee, I still have my VS1053 breakout setup so I can test tonight.

Amazing! Thanks @peekay123!

1 Like

@stoobee, I get the same results so I’ll have to do some digging. I tried volume (1,1) which should be very loud but I got the same results as volume (200, 200).

@peekay123 yeh, that’s the probelem I was having… Thanks for letting me know

7 posts were merged into an existing topic: Problem Local Compiling in Particle Dev

Hi @peekay123 just wondering if you had any luck with the setVolume()? I really can’t figure it out :frowning:

@stoobee, I looked at the datasheet and it should work. I need to check on a few other settings that may affect the volume control. :smile:

@peekay123 thanks, fingers crossed you can work it out!

1 Like

So after much frustration I was able to get this up and running. I had 2 bad Photon boards. Had to tweak a few things in code (adding MOSI, MISO, etc to the constructor calls). I now am able to cloud pass a file name and it play it.

The one think I am noticing compared to my second setup with an Arduino Uno is the files are playing a little slower with the Photon setup. Has anyone else experienced this?

Hi @JerseyTechGuy the files playing slower isn’t something I have noticed…