rev1

Dependencies:   4DGL-uLCD-SE EthernetInterface NTPClient SDFileSystem mbed-rtos mbed wave_player PinDetect

Fork of WavePlayer_HelloWorld by jim hamblen

Revision:
4:55035e20ae61
Parent:
3:5f0b28699a67
Child:
5:3c880df67e2e
--- 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