Instead of holding the songs on a SD card, this one is for a USB stick
Dependencies: WavPlayer mbed C12832 MSCFileSystem WavPlayerSD
Revision 6:ea92f15a3798, committed 2019-04-14
- Comitter:
- JostBaus
- Date:
- Sun Apr 14 16:42:49 2019 +0000
- Parent:
- 5:166fa9e3c8e3
- Commit message:
- WavPlayer with USB instead of SDcard
Changed in this revision
diff -r 166fa9e3c8e3 -r ea92f15a3798 MSCFileSystem.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MSCFileSystem.lib Sun Apr 14 16:42:49 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/chris/code/MSCFileSystem/#f80d1f58be90
diff -r 166fa9e3c8e3 -r ea92f15a3798 SDFileSystem.lib --- a/SDFileSystem.lib Sun Apr 14 16:27:52 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/SDFileSystem/#c8f66dc765d4
diff -r 166fa9e3c8e3 -r ea92f15a3798 WavPlayerSD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WavPlayerSD.lib Sun Apr 14 16:42:49 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/teams/WavSpiller_Oppgave/code/WavPlayerSD/#166fa9e3c8e3
diff -r 166fa9e3c8e3 -r ea92f15a3798 main.cpp --- a/main.cpp Sun Apr 14 16:27:52 2019 +0000 +++ b/main.cpp Sun Apr 14 16:42:49 2019 +0000 @@ -4,15 +4,14 @@ #include "math.h" #include "C12832.h" #include "WavPlayer.h" -#include "SDFileSystem.h" +#include "MSCFileSystem.h" #include <string> using namespace std; //Communication\interfaces Serial pc(USBTX,USBRX); //USB serial C12832 lcd(p5, p7, p6, p8, p11); //LCD -SDFileSystem sd(p11, p12, p13, p15, "sd"); //SDCard -DigitalIn sdDetect(p14); //CardDetect +MSCFileSystem msc("USB"); //USB //in- and outputs DigitalIn PauseBtn(p21); @@ -57,7 +56,7 @@ { lcd.cls(); sd.disk_initialize(); - read_file_names("/sd/Music"); + read_file_names("/USB/Music"); while(1) { lcd.locate(0,0); lcd.printf("Please select a song"); @@ -96,7 +95,7 @@ void PlaySong(int m) { string songname = songs[m]; - string a = "/sd/Music/"; + string a = "/USB/Music/"; string fname = a + songname; //retrieves the file name FILE *wave_file; dur.start();