Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE PinDetect SDFileSystem mbed-rtos mbed wave_player
Fork of 4180_Lab4_v6 by
Revision 2:68c4e1539da5, committed 2016-10-31
- Comitter:
- ecardenas8
- Date:
- Mon Oct 31 20:52:10 2016 +0000
- Parent:
- 1:abd7e0631db8
- Commit message:
- hey its frogger
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r abd7e0631db8 -r 68c4e1539da5 main.cpp
--- a/main.cpp Mon Oct 31 19:52:09 2016 +0000
+++ b/main.cpp Mon Oct 31 20:52:10 2016 +0000
@@ -23,6 +23,7 @@
bool Alive = 1;
bool Drown = 0;
bool Splat = 0;
+bool Victory = 0;
double CarWidth = 10;
int i = 11;
int j = 11;
@@ -191,10 +192,21 @@
uLCD.printf("SPLAT!");
stdio_mutex.unlock();
- //FILE *wave_file;
- //wave_file=fopen("/sd/Splat.wav","r");
- //waver.play(wave_file);
- //fclose(wave_file);
+ FILE *wave_file;
+ wave_file=fopen("/sd/Splat.wav","r");
+ waver.play(wave_file);
+ fclose(wave_file);
+ }
+ if(Victory == 1){
+ stdio_mutex.lock();
+ uLCD.locate(1,1);
+ uLCD.printf("Victory!");
+ stdio_mutex.unlock();
+
+ FILE *wave_file;
+ wave_file=fopen("/sd/Victory.wav","r");
+ waver.play(wave_file);
+ fclose(wave_file);
}
Thread::wait(10);
}
