UoD_ME30001_Group_1_03 / Mbed 2 deprecated timer

Dependencies:   mbed C12832_lcd

Revision:
2:684c698024c4
Parent:
1:13aae0117bbf
Child:
3:d235ec2ba7b8
--- a/main.cpp	Thu Nov 15 12:01:57 2018 +0000
+++ b/main.cpp	Thu Nov 15 12:35:00 2018 +0000
@@ -4,11 +4,11 @@
 
 C12832_LCD lcd;
 Timeout increment;
-BusIn up(p16);
-BusIn down(p17);
-BusIn left(p18);
-BusIn right(p19);
-BusIn centre(p20);
+BusIn up(p15);
+BusIn down(p12);
+BusIn left(p13);
+BusIn right(p16);
+BusIn centre(p14);
 
 int hours=0;
 int minutes=0;
@@ -16,21 +16,21 @@
 
 // How to detect if up is hold not press?
 
-if (up = 1){
-        if (left = 1) {
+if (up){ // switching between increasing hrs and minutes
+        if (left) {
         inc_hrs(); 
         }
-    else if (right = 1){
+    else if (right){
         inc_min();
         }
     }
 
 
-if (down = 1)
+if (down) //switching between decreasing minutes and hours
 {
-    if (left = 1) {
+    if (left) {
         inc_hrs();
-    } else if (right=1) {
+    } else if (right) {
         inc_min();
     }
 }
@@ -73,7 +73,7 @@
     adj_hrs();
 
 }
-
+//function for decrementing 
 /**
     Main entry point
 */