テスト
Dependencies: C12832 USBHost mbed MMA7660 wave_player
Fork of app-board-Speaker by
Diff: main.cpp
- Revision:
- 12:c1148331b151
- Parent:
- 11:5e85ab7d4176
- Child:
- 13:58877e942d84
--- a/main.cpp Mon Dec 12 07:02:14 2016 +0000 +++ b/main.cpp Mon Dec 12 07:49:45 2016 +0000 @@ -37,7 +37,7 @@ //for music AnalogOut DACout (p18); -wave_player waver(&DACout, &sp1); +wave_player waver(&DACout); int i=0; int count = 0; @@ -303,6 +303,7 @@ } } + int main() { wait(0.01); @@ -315,7 +316,8 @@ //Thread thread4(count_thread,(void *)"Th 4"); //Thread thread5(acc_thread,(void *)"Th 5"); Thread thread6(disp_thread, (void *)"Th 6"); - + //Thread thread7(sound_thread, (void *)"Th 7"); + //for USB USBHostMSD msd("usb"); while(!msd.connect()) @@ -325,7 +327,7 @@ //for music file FILE *wave_file; - //sp1.period(1.0 / 400000.0); + //sp1.period(1.0 / 16000.0); wave_file = fopen("/usb/music/BGMforMBED2-lowQ.wav", "r"); waver.play(wave_file); fclose(wave_file);