wave cancel
Dependencies: 4DGL-uLCD-SE EthernetInterface NTPClient PinDetect SDFileSystem mbed-rtos mbed wave_player HTTPClient
Fork of 4180_Final_Project_WaveProblems by
Diff: main.cpp
- Revision:
- 4:55035e20ae61
- Parent:
- 3:5f0b28699a67
- Child:
- 5:3c880df67e2e
diff -r 5f0b28699a67 -r 55035e20ae61 main.cpp --- a/main.cpp Fri Apr 22 17:15:19 2016 +0000 +++ b/main.cpp Fri Apr 22 17:20:59 2016 +0000 @@ -60,6 +60,14 @@ myled2 = !myled2; } +void play_file() +{ + FILE *wave_file; + printf("\n\n\nHello, wave world!\n"); + wave_file=fopen("/sd/bob.wav","r"); + waver.play(wave_file); + fclose(wave_file); +} int main() { snooze.mode(PullUp); @@ -104,9 +112,6 @@ Thread thread_time(time_thread); - FILE *wave_file; - printf("\n\n\nHello, wave world!\n"); - wave_file=fopen("/sd/bob.wav","r"); - waver.play(wave_file); - fclose(wave_file); + play_file(); + } \ No newline at end of file