ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Revision:
1:ce0d477de314
Parent:
0:bed27dc63dea
Child:
2:e9ac69c17a75
--- a/main.cpp	Tue Mar 12 09:48:10 2019 +0000
+++ b/main.cpp	Fri Apr 05 15:44:09 2019 +0000
@@ -2,8 +2,55 @@
 ELEC2645 Embedded Systems Project
 School of Electronic & Electrical Engineering
 University of Leeds
-Name:
-Username:
-Student ID Number:
-Date:
-*/
\ No newline at end of file
+Name: Shahid Zubin Sajid
+Username: el17szs   
+Student ID Number: 201197609
+Date: 21/03/2019
+*/
+
+#include "mbed.h"
+#include "Gamepad.h"
+#include "N5110.h"
+
+
+N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
+Gamepad pad;
+
+void init();
+
+void welcome();
+
+int main(){
+    int fps=8;
+    init();
+    welcome();
+    wait(1.0f/fps);
+}
+void init(){
+    lcd.init();
+    pad.init();
+    
+    
+    lcd.setContrast(0.4);
+    lcd.normalMode();      // normal colour mode
+    lcd.setBrightness(0.5);
+    lcd.clear();
+    
+}
+void welcome() {
+    
+    lcd.printString("     GAME    ",0,1);  
+    lcd.printString("     SHAHID ZUBIN SAJID    ",0,2); 
+    lcd.printString("     el17szs    ",0,3);
+    lcd.printString("  Press Start ",0,4);
+    lcd.refresh();
+     
+    // wait flashing LEDs until start button is pressed 
+    while ( pad.check_event(Gamepad::START_PRESSED) == false) {
+        pad.leds_on();
+        wait(0.1);
+        pad.leds_off();
+        wait(0.1);
+    }
+ 
+}
\ No newline at end of file