0

Music Maker Shield, interrupts and startPlayingFile
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Music Maker Shield, interrupts and startPlayingFile

by drew345 on Tue Mar 22, 2016 5:09 am

I have an Adafruit Music Maker Shield 1790 and I can’t get the example sketch player_simple to run correctly with the interrupts. I am using Arduino Uno.

The player_simple sketch complies fine and then I get
VS1053 found
Playing track 001

And the first track starts playing. But when it gets to the second track, it prints immediately
Playing track 002
Done playing music

And the second track never plays.

The problem is with the two versions of the musicPlayer “play” commands.

The version for playing the file in full:
musicPlayer.playFullFile("track001.mp3");

will work perfectly, while the version for playing in the background:
musicPlayer.startPlayingFile("track001.mp3");

doesn’t work, it just skips the file.

The problem is not with the music files (track001.mp3 and track002.mp3) . I can play both tracks just fine with the playFullFile command and both tracks are just skipped when I use the startPlayingFile command.

I see the notes that the startPlayingFile command requires interrupts. I have the interrupt code still in the player_simple sketch as originally written.

#define DREQ 3

musicPlayer.useInterrupt(VS1053_FILEPLAYER_PIN_INT);

Do I have to add attachInterrupt statements to the example sketch? Seems that those would have been added already if required.

Any idea why I can’t get the musicPlayer. musicPlayer.startPlayingFile command to work on the Music Maker shield with the player_simple example sketch?

Thanks,

drew345
 
Posts: 2
Joined: Tue Mar 22, 2016 4:53 am

Re: Music Maker Shield, interrupts and startPlayingFile

by adafruit_support_mike on Wed Mar 23, 2016 11:17 pm

The code should work as written.

Post a photo showing your hardware and connections and we'll see if those give us any clues. 800x600 images usually work best.

adafruit_support_mike
 
Posts: 51412
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.