Music Shield v2 Pause problem

The code is combined with heartbeat sensor and music shield v2. I have rewrite the library of music with add a player1. The player function will play an background music then when the heartbeat was faster than 90, the player function pause, then i want player1 to play another song. After entering the function the player1 function should play, but it didn’t. The condition is the player function will pause but the player1 function didn’t work. Could anyone know how to fix this problem? Thank you :smiley: :smiley: :smiley:

code.rar (11.8 KB)

I haven’t tried your code, but maybe you need to add a code to your program

player.keyDisable();//keys disable first;

And i found that there’re maybe some problems about the command:player.playOne , we’ll have a further application to test it.

Good luck

Hi lisa10203,

Thanks for reporting the bugs. The “playOne” method didn’t mean to switch to the new song immediately, it just added the song to playlist in the previous implementation. We fixed this issue. Now when you call playOne , the player switch to the new song immediately.

Please check out the new library at github -
And find the new demo switchSongWithName.
Hope this will help you. :smiley:

Good to know that this issue has been solved. And please pay attention, you need pull up the level of interrupt0 first. Good luck.