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:
- 2:ee6a6bcbce87
- Parent:
- 1:664a272ab028
- Child:
- 3:12b2bc47a0df
diff -r 664a272ab028 -r ee6a6bcbce87 main.cpp --- a/main.cpp Sun Mar 08 12:32:51 2020 +0000 +++ b/main.cpp Wed Mar 11 15:31:56 2020 +0000 @@ -14,14 +14,35 @@ #include "mbed.h" #include "Gamepad.h" #include "N5110.h" +#include "Objects.h" // objects Gamepad pad; N5110 lcd; +Objects objects; + +//functions +void initialise(); int main() { + initialise(); + + while(1){ + lcd.clear(); + objects.draw_base(lcd); + objects.draw_cannon(lcd); + objects.cannon_position(pad); + lcd.refresh(); + wait(0.005); + + } +} + +void initialise(){ + pad.init();//initialises the gamepad + lcd.init();//initialises the N5100 screen }