Skip to content

Commit bdbc4f8

Browse files
committed
Unmount USB stick after completion of playing the sound file.
1 parent 1b12257 commit bdbc4f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/Beginner/Audio_Playback/Audio_Playback.ino

+7
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ void setup()
5353

5454
Serial.println("Cleaning up ...");
5555
fclose(f);
56+
int const rc_umount = usb.unmount();
57+
if (rc_umount < 0)
58+
{
59+
Serial.print("Error unmounting USB drive: ");
60+
Serial.println(rc_umount);
61+
return;
62+
}
5663
}
5764

5865
void loop() {}

0 commit comments

Comments
 (0)