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 2:fca0a4b96e1b, committed 2020-05-20
- Comitter:
- chessdsbr
- Date:
- Wed May 20 21:55:12 2020 +0000
- Parent:
- 1:e4d7342be507
- Commit message:
- Songs
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| wave_player.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue May 16 05:18:55 2017 +0000
+++ b/main.cpp Wed May 20 21:55:12 2020 +0000
@@ -1,19 +1,17 @@
#include "mbed.h"
#include "SDFileSystem.h"
-
-SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board
-
+#include <wave_player.h>
+DigitalOut Led(LED1);
+ AnalogOut DAcout (PTE30);
+SDFileSystem sd(D11, D12, D13, D10, "sd"); // the pinout on the mbed Cool Components workshop board
+ wave_player waver(&DAcout);
int main() {
- printf("Hello World!\n");
-
- mkdir("/sd/mydir", 0777);
+ FILE *wave_file;
+ wait(0.3);
+wave_file=fopen("/sd/gano.wav","r");
+waver.play(wave_file);
+fclose(wave_file);
+ while(1)
+ {}
- FILE *fp = fopen("/sd/mydir/sdtest.txt", "w");
- if(fp == NULL) {
- error("Could not open file for write\n");
- }
- fprintf(fp, "Hello fun SD Card World!");
- fclose(fp);
-
- printf("Goodbye World!\n");
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wave_player.lib Wed May 20 21:55:12 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/sravet/code/wave_player/#acc3e18e77ad