ELEC2645 (2018/19) / Mbed 2 deprecated el16y2m

Dependencies:   mbed

Revision:
17:9f7ff626210b
Parent:
11:ef3d6696ae84
--- a/main.cpp	Thu May 09 04:54:18 2019 +0000
+++ b/main.cpp	Thu May 09 05:08:02 2019 +0000
@@ -1,5 +1,13 @@
+/*
+Yuyang Miao
+201089114
+Electrical and Electronic Engineering
+Misery Miner
+*/
+
 #include "Level.h"
 
+//objects
 N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
 Menu Menu;
 Level Level;
@@ -16,7 +24,7 @@
 InterruptIn Back(PTB19);
 Gamepad Gamepad;
 
-void init();
+void init();//initialization lcd, gamepad, and debut value
 
 int main()
 {   //initialize lcd, gamepad, and debut values
@@ -29,7 +37,7 @@
                 break;
 
             case 2:
-                Menu.TNT_m(lcd, A, B);
+                Menu.TNT_m(lcd, A, B);//print Menu ask you if youwant to buy a TNT
                 Level.level_2(Image, lcd, Rotate, Release, detect, Pull, A, B, logistic, Level, Tool);
                 break;
 
@@ -45,7 +53,7 @@
 {   Gamepad.init();
     lcd.init();
     int ii;
-    for(ii=0; ii<3; ii=ii+1) {
+    for(ii=0; ii<3; ii=ii+1) {//set debut value
     Rotate.return_angle[ii]=PI;
     Rotate.return_flag[ii]=1;
     }