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: mbed wave_player SDFileSystem
Revision 0:a939a9a81cd9, committed 2019-03-15
- Comitter:
- RSramek
- Date:
- Fri Mar 15 16:21:36 2019 +0000
- Commit message:
- upload
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SDFileSystem.lib Fri Mar 15 16:21:36 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/teams/ECE-418012/code/SDFileSystem/#651ba0349235
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Mar 15 16:21:36 2019 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "SDFileSystem.h"
+#include "wave_player.h"
+
+SDFileSystem sd(PTD2, PTD3, PTD1, PTE0, "sd"); //SD card
+AnalogOut DACout(PTE0);
+DigitalOut ledR(LED_RED);
+
+wave_player waver(&DACout);
+
+int main(){
+ while(1){
+ FILE *wave_file;
+ wave_file=fopen("/sd/coin.wav","r");
+ wait(0.001);
+
+ if (wave_file == NULL){
+ ledR = 0;
+ wait(1);
+ ledR = 1;
+ } else {
+ waver.play(wave_file);
+ fclose(wave_file);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Mar 15 16:21:36 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wave_player.lib Fri Mar 15 16:21:36 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/sravet/code/wave_player/#acc3e18e77ad