Yang Zhenye 201199680

Dependencies:   mbed

Committer:
yangzhenye
Date:
Thu May 14 18:30:55 2020 +0000
Revision:
8:c02c278320c0
Parent:
4:eb8dca1dc341
el17zy

Who changed what in which revision?

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