PlaySFX (sound effect from Flash) example
Dependencies: PokittoLib
Revision 19:64f88ef5ef07, committed 2019-04-05
- Comitter:
- Pokitto
- Date:
- Fri Apr 05 11:18:51 2019 +0000
- Parent:
- 18:b5f252ba0083
- Commit message:
- Added pure polling to buttons as an example
Changed in this revision
--- a/My_settings.h Thu Apr 04 17:09:07 2019 +0000 +++ b/My_settings.h Fri Apr 05 11:18:51 2019 +0000 @@ -7,5 +7,7 @@ //#define PROJ_HIGH_RAM HIGH_RAM_MUSIC // put music buffers in SRAM1/2 //#define PROJ_SDFS_STREAMING #define PROJ_AUD_FREQ 8000 +// +#define PROJ_BUTTONS_POLLING_ONLY //use only polling (no interrupts) for buttons #endif \ No newline at end of file
--- a/PokittoLib.lib Thu Apr 04 17:09:07 2019 +0000 +++ b/PokittoLib.lib Fri Apr 05 11:18:51 2019 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/Pokitto/code/PokittoLib/#068fa6345036 +https://os.mbed.com/users/Pokitto/code/PokittoLib/#61a4ccb0a4b6
--- a/main.cpp Thu Apr 04 17:09:07 2019 +0000 +++ b/main.cpp Fri Apr 05 11:18:51 2019 +0000 @@ -17,7 +17,14 @@ Sound::playSFX(sfx_3_jump, sfx_3_jump_length); Display::bgcolor++; } - Display::clear(); + if(Buttons::aBtn()){ + Display::print(1,1,"A"); + } + if(Buttons::bBtn()){ + Sound::playSFX(sfx_3_jump, sfx_3_jump_length); + Display::print(1,1,"B"); + } + //Display::clear(); } } return 0;