HI,
I think I have the same problem, although I don't understand how to apply the sollutions given in this forum to my problem. I am using an Adafruit VS1053 Music Maker shield with an 8 ohm speaker. I tried using the player_interrupt and player_simple code but both do not work, but in different ways. I am using the VS1053 shield to make an interactive trash bin with an IR sensor, tilt sensor and 4 neopixel rgb strips. I am using an Arduino Uno.
With the player_simple, i get the following serial monitor messages:
adafruit VS1053 simple test
VS1053 found
SYSTEM~1/
WPSETT~1.DAT 12
INDEXE~1 76
TRACK~1.MP3 147165
TRACK~2.MP3 132850
TRACK~3.MP3 95756
Playing track 001
Playing track 002
Done playing music
But no music has played.
With the player_interrupt code, the serial monitor gives me these messages. This is when I upload the file, but haven't opened the serial monitor yet:
Adafruit VS1053 Library test
VS1053 found
If I already opened the serial monitor, and the code runs a 2nd round, I see more messages(I programmed line of code for the tune as an extra):
Adafruit VS1053 Library Test
VS1053 found
tone played
SD OK!
SYSTEM~1/
WPSETT~1.DAT 12
INDEXE~1 76
TRACK0~1.MP3 147165
TRACK0~2.MP3 132850
TRACK0~3.MP3 95756
Could not open file track001.mp3
I do hear the tune through my headphones. Also through my speaker. ALthough it seams to take longer before they are played through the speaker. So therefore I conclude the board works, jack works, arduino-VS1053 connection works and the connection to the speaker works.
I have 3 tracks on the microSD, called track001.mp3, track002.mp3, track003.mp3.
So these are my questions:
-
What I am I doing wrong compared to the tutorial provided by adafruit (Play Music | Adafruit Music Maker Shield | Adafruit Learning System) that I set everything up, but it won't work. (I used the latest libraries)?
-
Why am I having information returned from the player_simple that the tracks have been played, but from player_interrupt it says it cannot open the track? With both I did not hear any of the tracks, just the tune from the code.
-
I want to use the IR sensor to activate uneven tracks, the tilt sensor should interrupt the uneven track played and to have it continue with and even number track. How is this achieved most easly?
-
Is the code in player interrupt supposed to run a 2nd round?
-
Tips to transfer this to an Arduino Micro? (I need the space that the Micro saves compared to an Uno).
Please, I am only a beginner. I don't know a lot of terms and I need some explanation. Thank you for any answers!!
player_simple_bin.ino (4.43 KB)
player_interrupts_bin.ino (4.45 KB)