lab 3
Dependencies: 4DGL-uLCD-SE SDFileSystem_OldbutworkswithRTOS mbed-rtos mbed wave_player
Fork of WavePlayer_HelloWorld_RTOS by
main.cpp
- Committer:
- 4180_1
- Date:
- 2017-04-18
- Revision:
- 2:c2afd0c426af
- Parent:
- 1:5b8e223e983d
- Child:
- 3:278a7d87de13
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); }