
Reproduce wave desde SD Card a pin análogo de salida
Dependencies: SDFileSystem mbed wave_player
Fork of WavePlayer_HelloWorld by
Revision 2:f06db47e56e3, committed 2017-05-15
- Comitter:
- franni
- Date:
- Mon May 15 21:57:08 2017 +0000
- Parent:
- 1:5b8e223e983d
- Child:
- 3:a11202fce37c
- Commit message:
- SD Card Wave File
Changed in this revision
--- a/SDFileSystem.lib Thu Jan 24 02:59:05 2013 +0000 +++ b/SDFileSystem.lib Mon May 15 21:57:08 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/SDFileSystem/#c8f66dc765d4 +http://mbed.org/users/mbed_official/code/SDFileSystem/#8db0d3b02cec
--- a/main.cpp Thu Jan 24 02:59:05 2013 +0000 +++ b/main.cpp Mon May 15 21:57:08 2017 +0000 @@ -1,20 +1,18 @@ - #include "mbed.h" #include "SDFileSystem.h" #include "wave_player.h" -SDFileSystem sd(p5, p6, p7, p8, "sd"); //SD card +SDFileSystem sd(PTD2, PTD3, PTD1, PTD0, "sd"); //pines SD card -AnalogOut DACout(p18); +AnalogOut DACout(PTE30); //pina analogo de salida -wave_player waver(&DACout); +wave_player parlante(&DACout); // salida wave al pin de salida int main() { - FILE *wave_file; - printf("\n\n\nHello, wave world!\n"); - wave_file=fopen("/sd/sample.wav","r"); - waver.play(wave_file); - fclose(wave_file); + FILE *audio; + audio=fopen("/sd/audio1.wav","r"); + parlante.play(audio); + fclose(audio); } \ No newline at end of file
--- a/mbed.bld Thu Jan 24 02:59:05 2013 +0000 +++ b/mbed.bld Mon May 15 21:57:08 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/63cdd78b2dc1 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/093f2bd7b9eb \ No newline at end of file