My ELEC2645 project. Nikollao Sulollari. 200804685

Dependencies:   N5110 SoftPWM mbed

Fork of Treasure_Hunt by ELEC2645 (2015/16)

Revision:
17:2d424db3975f
Parent:
16:a6ca6858af24
Child:
18:5405ee7e243b
--- a/main.cpp	Mon May 02 08:56:08 2016 +0000
+++ b/main.cpp	Mon May 02 11:02:36 2016 +0000
@@ -6,19 +6,13 @@
 #include "main.h"
 #include "stdlib.h"
 
-#include "P_defines.h"
-#include "hero.h"
-#include "joystick.h"
-#include "game.h"
-#include "background.h"
-
 int main()
 {
     lcd.init();
     init_K64F();
     init_serial();
     init_game(); ///initialize game
-    
+    led_output = fsm[fsm_state];
     calibrateJoystick(); ///calibrate joystick
     button.rise(&button_isr); ///assign rise with ISR
     button1.rise(&button1_isr);
@@ -37,9 +31,7 @@
             g_timer_flag = 0; ///reset flag
             lcd.clear();
             guidance();
-            drawHero();
-            moveHero();
-            //hero();
+            hero();
             enemies();
             obstacles();
 
@@ -76,9 +68,6 @@
     b_led = 1;
     
     blue_led = 1;
-    left_led = 1;
-    centre_led = 1;
-    right_led = 1;
 
     // since the on-board switches have external pull-ups, we should disable the internal pull-down
     // resistors that are enabled by default using InterruptIn