inital commit
Dependencies: mbed wave_player mbed-rtos 4DGL-uLCD-SE SDFileSystem2 PinDetect MMA8452
main.cpp
- Committer:
- 4180_1
- Date:
- 2017-04-18
- Revision:
- 2:c2afd0c426af
- Parent:
- 1:5b8e223e983d
- Child:
- 3:8a1fd3450cb5
File content as of revision 2:c2afd0c426af:
#include "mbed.h" #include "rtos.h" #include "SDFileSystem.h" #include "wave_player.h" SDFileSystem sd(p5, p6, p7, p8, "sd"); //SD card AnalogOut DACout(p18); wave_player waver(&DACout); int main() { FILE *wave_file; printf("\r\n\nHello, wave world!\n\r"); Thread::wait(1000); wave_file=fopen("/sd/sample.wav","r"); if(wave_file==NULL) printf("file open error!\n\n\r"); waver.play(wave_file); fclose(wave_file); }