James Heavey / Mbed 2 deprecated 3875_DISSERTATION

Dependencies:   mbed 3875_Individualproject

Revision:
8:b862106f1162
Parent:
7:7fefd782532d
Child:
9:952586accbf9
--- a/main/main.cpp	Sat Feb 22 03:21:56 2020 +0000
+++ b/main/main.cpp	Sat Feb 22 04:46:51 2020 +0000
@@ -182,9 +182,6 @@
                 }
                 
             }
-            robot.stop();
-            wait(0.2);
-            robot.scan();
             
             if ( sensor[0] > sens_thresh && (sensor[1] < sens_thresh && sensor[2] < sens_thresh && sensor[3] < sens_thresh) ) {
                 robot.forward(speed);
@@ -196,7 +193,6 @@
                 robot.scan();
             }
             
-            robot.stop();
             
             if ( sensor[1] > sens_thresh || sensor[2] > sens_thresh || sensor[3] > sens_thresh ) {
                 straight = true;
@@ -214,26 +210,6 @@
                 
             }
             
-            robot.stop();
-            wait(0.2);
-            robot.scan();
-            
-            if ( sensor[0] > sens_thresh && (sensor[1] < sens_thresh && sensor[2] < sens_thresh && sensor[3] < sens_thresh) ) {
-                robot.forward(speed);
-                goal_test1 = true;
-                while ( sensor[0] > sens_thresh && sensor[1] < sens_thresh && sensor[2] < sens_thresh && sensor[3] < sens_thresh ) { 
-                    robot.scan();
-                }
-                robot.scan();
-                if ( sensor[0] > sens_thresh && (sensor[1] > sens_thresh && sensor[2] > sens_thresh && sensor[3] > sens_thresh)) {
-                    goal_test2 = true;
-                    //goal();
-                }
-                robot.scan();
-            }
-            
-            robot.stop();
-            
             if ( sensor[1] > sens_thresh || sensor[2] > sens_thresh || sensor[3] > sens_thresh ) {
                 straight = true;
             }