My ELEC2645 project. Nikollao Sulollari. 200804685

Dependencies:   N5110 SoftPWM mbed

Fork of Treasure_Hunt by ELEC2645 (2015/16)

Revision:
21:6b02ef341358
Parent:
20:59aa6189a47d
--- a/main.h	Mon May 02 17:57:27 2016 +0000
+++ b/main.h	Wed May 04 09:19:50 2016 +0000
@@ -21,37 +21,37 @@
 DigitalOut r_led(LED_RED);
 
 /**
-@nameSpace g_led
+@namespace g_led
 @brief output for status of green LED
 */
 DigitalOut g_led(LED_GREEN);
 
 /**
-@nameSpace b_led
+@namespace b_led
 @brief output for status of blue LED
 */
 DigitalOut b_led(LED_BLUE);
 
 /**
-@nameSpace blue_led
+@namespace blue_led
 @brief output for status of blue LED, lights when game tool is loaded
 */
 DigitalOut blue_led(PTA1);
 
 /**
-@nameSpace led_output
+@namespace led_output
 @brief output for status of left tries for the user to win the game
 */
 BusOut led_output(PTC2,PTA2,PTB23);
 
 /**
-@nameSpace lcd
+@namespace lcd
 @brief object of the N5110 class
 */
 N5110 lcd(PTE26 , PTA0 , PTC4 , PTD0 , PTD2 , PTD1 , PTC3);
 
 /**
-@nameSpace pc
+@namespace pc
 @brief serial connection between mbed and pc
 */
 Serial pc(USBTX,USBRX);
@@ -62,62 +62,62 @@
 
 
 /**
-@nameSpace xPot
+@namespace xPot
 @brief read x-axis position from the value of the joystick
 */
 AnalogIn xPot(PTB2);
 
 /**
-@nameSpace yPot
+@namespace yPot
 @brief read y-axis position from the value of the joystick
 */
 AnalogIn yPot(PTB3);
 
 /**
-@nameSpace button
+@namespace button
 @brief interrupt executes an event triggered task
 */
 InterruptIn button(PTB10);
 
 /**
-@nameSpace button
+@namespace button
 @brief interrupt executes an event triggered task
 */
 InterruptIn button1(PTB18);
 
 /**
-@nameSpace buzzer
-@brief create PWM signal to set buzzer duty cycle and period
+@namespace buzzer
+@brief create PWM signal using the SoftPWM library to set buzzer duty cycle and period
 */
 SoftPWM buzzer(PTB9);
 
 /**
-@nameSpace ticker
+@namespace ticker
 @brief interrupt executes a time-triggered task
 */
 Ticker ticker;
 
 /**
-@nameSpace timer
+@namespace timer
 @brief  interface is used to measure the time between start and stop
 */
 Timer timer;
 
 /**
-@nameSpace game_ticker
+@namespace game_ticker
 @brief interrupt executes a time-triggered task
 */
 Ticker game_ticker;
 
 /**
-@nameSpace timeout
+@namespace timeout
 @brief interrupt calls a function after a specified amount of time
 */
 Timeout timeout;
 
 
 /**
-@nameSpace DirectionName
+@namespace DirectionName
 @brief define joystick's direction based on its x,y values
 */
 enum DirectionName {
@@ -133,7 +133,7 @@
 };
 
 /**
-@nameSpace Joystick
+@namespace Joystick
 @brief create strcut Joystick
 */
 typedef struct JoyStick Joystick;
@@ -148,14 +148,12 @@
 /// create struct variable
 Joystick joystick;
 
+/**
+The main function where the program takes place
+*/
 int main();
 
 /**
-Displays an error message
-*/
-void error();
-
-/**
 set-up serial port
 */
 void init_serial();
@@ -273,7 +271,7 @@
 Check for intrersection
 @param i loops through x direction
 @param j loops through y direction
-@returns the number of pixels aroun the hero detected
+@returns the number of pixels around the hero detected
 */
 int intersection(int i, int j);
 
@@ -331,8 +329,6 @@
 
 int state1 = 1; /*!< controls the direction of the objtacle */
 
-//int menuY = 5; /*!< controls the position of the circle selector */
-
 int speed = 1; /*!< controls the speed menu display  */
 
 bool normal=0; /*!< controls the lcd mode selection on menu */