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
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 - github.com/Seeed-Studio/Music_Shield
And find the new demo switchSongWithName.
Hope this will help you.