IESS / Robot

Dependencies:   btbee m3pi_ng mbed FatFileSystem MSCFileSystem

Revision:
13:9bb4ac4968d2
Parent:
12:0422156f83f6
Child:
14:5b3cc7741bdf
diff -r 0422156f83f6 -r 9bb4ac4968d2 main.cpp
--- a/main.cpp	Mon Jun 01 08:06:02 2015 +0000
+++ b/main.cpp	Mon Jun 01 08:10:10 2015 +0000
@@ -207,19 +207,17 @@
 
 
         current_pos = robot.line_position();
-       /*if (fgets(sweepValue, 100, sweep) != NULL){
-            if (import < sweepData.size())*/
-                f = 19.8/20 * t + .2;
-                newSetPoint = A*sin(2*PI*f*t);
-                proportional =  newSetPoint + current_pos;
+       if (fgets(sweepValue, 100, sweep) != NULL){
+            
+                //f = 19.8/20 * t + .2;
+                //newSetPoint = A*sin(2*PI*f*t);
+                proportional =  atof(sweepValue) + current_pos;
                 
-            /*else
-                break;*/
-        /*}
+        }
         else{
             robot.printf("Try Again");
             break;
-        }*/
+        }
         
 
         derivative = current_pos - previous_pos;