Hello World for the Nucleo soundboard library
Dependencies: WTV020SD_Sound_Breakout_Library mbed
Revision 0:b6e1b3c47ecc, committed 2014-11-02
- Comitter:
- ejteb
- Date:
- Sun Nov 02 11:09:29 2014 +0000
- Commit message:
- Updated to make it work
Changed in this revision
diff -r 000000000000 -r b6e1b3c47ecc WTV020SD_Sound_Breakout_Library.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WTV020SD_Sound_Breakout_Library.lib Sun Nov 02 11:09:29 2014 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/ejteb/code/WTV020SD_Sound_Breakout_Library/#b24351bba700
diff -r 000000000000 -r b6e1b3c47ecc main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Nov 02 11:09:29 2014 +0000 @@ -0,0 +1,29 @@ +#include "mbed.h" +#include "soundboard.h" +int main(void) +{ + //initialise the soundboard + soundboard mySoundBoard(D1, D2, D3, D4); + //play track 0 + mySoundBoard.play(0); + //play track 1 + mySoundBoard.playAsync(1); + //set the volume as 3 + mySoundBoard.setVolume(VOL_3); + wait(.5); + //set the volume as 7 (max) + mySoundBoard.setVolume(VOL_7); + wait(.5); + //mute the playback, but the playback will continue + mySoundBoard.setVolume(MUTE); + wait(.5); + //pause playback + mySoundBoard.pause(); + wait(.5); + //continue playback + mySoundBoard.pause(); + wait(.5); + //reset the soundboard. + mySoundBoard.reset(); + while(1); +} \ No newline at end of file
diff -r 000000000000 -r b6e1b3c47ecc mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Nov 02 11:09:29 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1 \ No newline at end of file