
Zeyu Feng 201377605
Dependencies: mbed
On Minerva
Diff: main.cpp
- Revision:
- 3:b8fbaefc496c
- Parent:
- 2:67b51ee7fc34
- Child:
- 4:b12a49f0b730
--- a/main.cpp Sun Apr 12 04:35:32 2020 +0000 +++ b/main.cpp Sun Apr 12 12:56:49 2020 +0000 @@ -15,21 +15,31 @@ #include "Gamepad.h" #include "N5110.h" #include "People.h" - +#include "PeopleEngine.h" // objects Gamepad pad; N5110 lcd; -People people; +PeopleEngine engine; int main() { + //initial lcd.init(); lcd.setContrast(0.5); + engine.init(); pad.init(); - people.init(); - people.draw(lcd); lcd.refresh(); - + + //a infinite loop to control position of the people + while(1) { + lcd.clear(); + engine.read_input(pad); + engine.update(); + engine.draw(lcd); + lcd.refresh(); + wait_ms(100); + } + }