Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 10:0c200ed5973a
- Parent:
- 8:c3153fd4d8ce
- Child:
- 11:1c5c549ba75e
--- a/main.cpp Tue Apr 30 09:27:09 2019 +0000 +++ b/main.cpp Tue Apr 30 09:32:46 2019 +0000 @@ -32,12 +32,14 @@ N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); Gamepad pad; DodgeEngine dodge; +Instruction instruction; ///////////// prototypes /////////////// void init(); void update_game(UserInput input); void render(); void welcome(); +void instructions(); ///////////// functions //////////////// int main() @@ -47,6 +49,7 @@ init(); // initialise and then display welcome screen welcome(); // waiting for the user to start + instructions(); // waiting for the user to start render(); // first draw the initial frame wait(1.0f/fps); // and wait for one frame period @@ -118,4 +121,10 @@ pad.leds_off(); wait(0.1); } +} + +void instruction() { + while (pad.check_event(Gamepad::A) == false) { + instruction.write(lcd, pad); + } } \ No newline at end of file