My ELEC2645 project. Nikollao Sulollari. 200804685

Dependencies:   N5110 SoftPWM mbed

Revision:
12:f591f1965abd
Parent:
11:53caf3d944a9
--- a/main.cpp	Thu Apr 28 16:29:06 2016 +0000
+++ b/main.cpp	Thu Apr 28 18:44:02 2016 +0000
@@ -8,13 +8,7 @@
 
 int main()
 {
-    lcd.init();
-    button.rise(&button_isr); ///assign rise with ISR
-    button1.rise(&button1_isr);
-    init_K64F();
-    init_serial();
-    
-    /*while(1) {
+    /*while(1) { // check if buttons are working
         
         lcd.clear();
         if (g_button_flag) {
@@ -32,11 +26,14 @@
         wait(0.2);
         lcd.refresh();
     }*/
-    
+    lcd.init();
+    init_K64F();
+    init_serial();
     init_game(); ///initialize game
+    button.rise(&button_isr); ///assign rise with ISR
+    button1.rise(&button1_isr);
     calibrateJoystick(); ///calibrate joystick
-
-    ticker.attach(&timer_isr,0.1); ///attach ticker with ISR every 0.1 sec
+    ticker.attach(&timer_isr,0.05); ///attach ticker with ISR every 0.1 sec
     reset = level; ///set reset = level to check later if level has increased
     // buzzer.start();
     //buzzer.write(0.5);