Reproduce wave desde SD Card a pin análogo de salida
Dependencies: SDFileSystem mbed wave_player
Fork of WavePlayer_HelloWorld by
main.cpp
- Committer:
- franni
- Date:
- 2017-05-15
- Revision:
- 3:a11202fce37c
- Parent:
- 2:f06db47e56e3
File content as of revision 3:a11202fce37c:
#include "mbed.h" #include "SDFileSystem.h" #include "wave_player.h" SDFileSystem sd(PTD2, PTD3, PTD1, PTD0, "sd"); //MOSI->DI, MISO->DO, SCK->SCK, PTD0->CS CD->NO CONRCTADA VDD A 3.3V O 5V Ssegun tipo de lectora (pines SD card) AnalogOut DACout(PTE30); //pina analogo de salida wave_player parlante(&DACout); // salida wave al pin de salida int main() { FILE *audio; audio=fopen("/sd/audio1.wav","r"); parlante.play(audio); fclose(audio); }