Smart car linefollower 1.0

Dependencies:   Motor mbed

Revision:
1:dea1971b7c83
Parent:
0:9cabfa16c820
diff -r 9cabfa16c820 -r dea1971b7c83 main.cpp
--- a/main.cpp	Mon Nov 28 10:34:24 2016 +0000
+++ b/main.cpp	Mon Nov 28 16:15:27 2016 +0000
@@ -4,7 +4,7 @@
 #define N true
 #define B false
 #define NUMSENS 4
-#define SPEED 0.35
+#define SPEED 0.7
 
 /*----------------------------------------------------------------------------//
 Con velocità base di 0.3
@@ -66,12 +66,12 @@
             Destra(1);
         }
         else if(stato==15) {
-            wait_ms(200);
+            wait_ms(100);
             if(stato==15){
                 Inversione();
             }
         }
-        wait_ms(150);
+        
     }
 }
 
@@ -88,7 +88,7 @@
         MotD.speed(SPEED-0.1);
     }else if(curv == 1){
         MotS.speed(SPEED+0.1);
-        MotD.speed(SPEED-0.2);   
+        MotD.speed(SPEED-0.3);   
     }
 }
 void Sinistra(int curv){
@@ -96,7 +96,7 @@
         MotS.speed(SPEED-0.1);
         MotD.speed(SPEED);
     }else if(curv == 1){
-        MotS.speed(SPEED-0.2);
+        MotS.speed(SPEED-0.3);
         MotD.speed(SPEED+0.1);   
     }
 }