Robot that currently does nothing

Dependencies:   4DGL-uLCD-SE SDFileSystem ShiftBrite mbed-rtos mbed wave_player Motor

Revision:
4:589e4a2028a7
Parent:
3:86cc67dbf731
Child:
5:6ca141fc6c4e
--- a/main.cpp	Wed Mar 15 05:21:48 2017 +0000
+++ b/main.cpp	Wed Mar 15 05:30:37 2017 +0000
@@ -40,13 +40,15 @@
     }     
 } 
 void sound_thread(){
-    //FILE *wave_file;
-    wave_file=fopen("/sd/vacuum.wav","r");    
-    if (wave_file == NULL){
-           led1=led2=led3=led4 = 1;     // if file read error, all LEDs ON
+    while(1) {
+        //FILE *wave_file;
+        wave_file=fopen("/sd/vacuum.wav","r");    
+        if (wave_file == NULL){
+               led1=led2=led3=led4 = 1;     // if file read error, all LEDs ON
+        }
+        waver.play(wave_file);
+        fclose(wave_file);  
     }
-    waver.play(wave_file);
-    fclose(wave_file);  
 }
 int main() {
     //thread1.start(IR_thread); // read in IR data