Zachary Sunberg / Mbed 2 deprecated SAILORSbot

Dependencies:   mbed

Revision:
28:15b95329a064
Parent:
27:949a31d30439
Child:
29:6aa49bba0d81
--- a/main.cpp	Wed Aug 05 05:57:37 2015 +0000
+++ b/main.cpp	Thu Aug 06 02:16:53 2015 +0000
@@ -8,7 +8,11 @@
     led4 = 1;
     
     int sensors[5];
-    float position = 0;
+    float position = 0.0;
+    static float previous_position = 0.0;
+    static float integral;
+    
+    
 
     //get sensors
     pi.sensor_reading(sensors);
@@ -16,6 +20,8 @@
     //line position
     position = pi.line_position();
     
+    
+    
     // Do your control calculations here
     ////////////////////////////////////