
Ellis Blackford Stroud 201155309
Dependencies: mbed FATFileSystem
main.cpp
- Committer:
- ellisbhastroud
- Date:
- 2019-03-20
- Revision:
- 2:81cfa8310f55
- Parent:
- 1:6179c2d67d19
- Child:
- 3:a8960004d261
File content as of revision 2:81cfa8310f55:
/* ELEC2645 Embedded Systems Project School of Electronic & Electrical Engineering University of Leeds Name: Ellis Blackford Stroud Username: el17ebs Student ID Number: 201155309 Date: 09/05/19 */ #include "mbed.h" #include "Gamepad.h" #include "N5110.h" #include "Menu.h" // objects N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); Gamepad pad; Menu menu; void init(); int main() { init(); lcd.clear(); menu.print_welcome(lcd); lcd.refresh(); wait(3); menu.print_menu(lcd); lcd.refresh(); //cursor begins on start MenuChoices m = START; while(1) { m = menu.menu_choice(m, pad, lcd); int d = pad.get_direction(); printf("menu choice = %i direction = %i \n" , m, d); lcd.refresh(); wait(0.1); } } void init() { lcd.init(); lcd.setContrast(0.5); pad.init(); }