I am trying with the Music Maker FeatherWing to save data on the SD card while playing music from an mp3 file from this same SD card, but each time I try to save some data to a file, it doesnt manage to open the file, or worse, it corrupts completely the data on the SD card.
I am using this function to play the music: "interrupt based / non-blocking playback via startPlayingFile()"
To create and wirte data I use this code:
Code: Select all
file = SD.open(FilePath, FILE_WRITE);
file.print(FileContent);
file.close();
I am using this Music Maker FeatherWing with an M0 proto feather, the motor featherwing and the 128x64 LED featherwing.
My question concerning thisis: is there a way to safely play music and save data on the SD card at the same time?
A second question : is there a way to stop the music while it is playing? I couldnt find what command does this.
Thank you!