Mochu Yao explorer game

Dependencies:   mbed

Committer:
el17my
Date:
Fri May 15 02:47:10 2020 +0000
Revision:
38:42ff379fa48c
Parent:
30:65e639ace415
the latest version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el17my 16:ccd6f707dc79 1 /*
el17my 16:ccd6f707dc79 2 ELEC2645 Embedded Systems Project
el17my 16:ccd6f707dc79 3 School of Electronic & Electrical Engineering
el17my 16:ccd6f707dc79 4 University of Leeds
el17my 16:ccd6f707dc79 5 2019/20
el17my 16:ccd6f707dc79 6
el17my 16:ccd6f707dc79 7 Name:Yao mochu
el17my 16:ccd6f707dc79 8 Username:el17my
el17my 16:ccd6f707dc79 9 Student ID Number:201199854
el17my 16:ccd6f707dc79 10 Date:2020/4/28
el17my 16:ccd6f707dc79 11 */
el17my 16:ccd6f707dc79 12
el17my 16:ccd6f707dc79 13 // includes
el17my 16:ccd6f707dc79 14 #include "mbed.h"
el17my 16:ccd6f707dc79 15 #include "Gamepad.h"
el17my 16:ccd6f707dc79 16 #include "N5110.h"
el17my 21:349c70c8a7de 17 #include "Menu.h"
el17my 16:ccd6f707dc79 18
el17my 16:ccd6f707dc79 19
el17my 16:ccd6f707dc79 20 // objects
el17my 16:ccd6f707dc79 21 Gamepad gamepad;
el17my 16:ccd6f707dc79 22 N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
el17my 21:349c70c8a7de 23 Menu _menu;
el17my 16:ccd6f707dc79 24
el17my 16:ccd6f707dc79 25 int main()
el17my 16:ccd6f707dc79 26 { gamepad.init();
el17my 16:ccd6f707dc79 27 _menu.init();
el17my 16:ccd6f707dc79 28 lcd.init();
el17my 16:ccd6f707dc79 29 lcd.normalMode();
el17my 16:ccd6f707dc79 30 lcd.setBrightness(0.5);
el17my 16:ccd6f707dc79 31 while(1) {
el17my 16:ccd6f707dc79 32 lcd.clear();
el17my 19:14c5427b30d1 33 _menu.run_engine(lcd, gamepad);
el17my 16:ccd6f707dc79 34 lcd.refresh();
el17my 16:ccd6f707dc79 35 wait(0.01); }
el17my 16:ccd6f707dc79 36 }