123

Dependencies:   mbed

Fork of Boboobooo by Clark Lin

Revision:
8:c2c3aee85c2d
Parent:
7:f04bde0ca846
Child:
9:a891053657f3
diff -r f04bde0ca846 -r c2c3aee85c2d main.cpp
--- a/main.cpp	Mon Jul 07 15:23:50 2014 +0000
+++ b/main.cpp	Tue Jul 08 04:36:09 2014 +0000
@@ -70,17 +70,17 @@
                 turn = Kp * error + middle;
             }
         }
-
-        /*if(turn == middle){
-            if (last_turn < middle){
+/*
+        if(turn == middle){
+            if (last_turn < 0.025){
                 
                 servo.set_angle(last_turn);
-                wait_ms(500);
+                wait_ms(200);
                 
-            } else if (last_turn > middle){
+            } else if (last_turn > 0.066){
                 
                 servo.set_angle(last_turn);
-                wait_ms(500);
+                wait_ms(200);
             }
             servo.set_angle(turn);
         } else {
@@ -91,7 +91,6 @@
         servo.set_angle(turn);
         
         
-        
         //output the psudo map
         for(int i = 127; i >= 0; i--)   
             psudo_line[i] = '0';