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.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 3:1a134243e2f0
- Parent:
- 2:421fb0670c5c
- Child:
- 6:46d0caedf217
--- a/main.cpp Thu Apr 12 22:46:30 2018 +0000 +++ b/main.cpp Sun Apr 15 17:36:29 2018 +0000 @@ -1,9 +1,8 @@ #include "mbed.h" -#include "stdio.h" -#include "stdlib.h" #include "Gamepad.h" #include "N5110.h" #include "rect.h" +#include "boom.h" #include "engine.h" DigitalOut gpo(D0); @@ -11,8 +10,11 @@ N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); + Gamepad pad; -engine rect; + +engine engine; + void init(); void welcome(); @@ -23,23 +25,18 @@ int main() { - int fps = 10; + int fps = 12; init(); welcome(); - - //lcd.clear(); - //lcd.refresh(); - render(); wait(1.0f/fps); while(1){ - rect.read_input(pad); - rect.update(pad); + engine.read_input(pad); + engine.update(pad); render(); - wait(1.0f/fps); } @@ -72,6 +69,6 @@ { // clear screen, re-draw and refresh lcd.clear(); - rect.draw(lcd); + engine.draw(lcd); lcd.refresh(); }