BlueUSB and Waveplayer merged
Dependencies: SDFileSystem mbed-rtos mbed wave_player
Fork of z_test_BlueUSBv1 by
Diff: main.cpp
- Revision:
- 3:146802bc7bb8
- Parent:
- 2:7f4915fe5708
--- a/main.cpp Tue Nov 18 18:42:28 2014 +0000 +++ b/main.cpp Tue Nov 18 22:26:33 2014 +0000 @@ -112,10 +112,43 @@ } void TestShell(); +/* +int main() +{ + pc.baud(230400); + printf("BlueUSBv1\nNow get a bunch of usb or bluetooth things and plug them in\n"); + TestShell(); +}*/ + + +#include "SDFileSystem.h" +#include "wave_player.h" + + + +SDFileSystem sd(p5, p6, p7, p8, "sd"); //SD card + +AnalogOut DACout(p18); + +wave_player waver(&DACout); + + int main() { pc.baud(230400); printf("BlueUSBv1\nNow get a bunch of usb or bluetooth things and plug them in\n"); TestShell(); + + FILE *wave_file; + printf("r\nr\nr\nHello, wave world!r\n"); + waver.set_verbosity(0); + while(1) { + wave_file=fopen("/sd/mydir/mega.wav", "r");//mega.wav","r");//donkey.wav", "r");//aliens.wav", "r");//birds.wav","r"); + waver.play(wave_file); + fclose(wave_file); + printf("\r\nDONE!\r\n"); + wait(3); + } } +