Final Project files for mBed development.

Dependencies:   m3pi mbed

Revision:
31:1e950ee04481
Parent:
30:3211e2962441
Child:
32:8b589710632b
--- a/main.c	Tue Dec 09 01:56:03 2014 +0000
+++ b/main.c	Tue Dec 09 21:18:07 2014 +0000
@@ -40,7 +40,6 @@
     pi.printf("Ready");
     pi.locate(0,1);
     pi.printf("%f mV", pi.battery());
-    wait(.5);
     pi.sensor_auto_calibrate();
     
     wait(1);
@@ -67,7 +66,8 @@
     } else {
         return 1;
     }
-    right(180);
+    left(180);
+    
     Timer caltimer;
     caltimer.start();
     do {
@@ -197,10 +197,10 @@
         if (angle >= 360) {
             angle -= 360;
         }
-        //pi.cls();
-        //pi.locate(0,0);
-        //pi.printf("a:%f", delta_a);
-        //timerWait(1.5);
+        pi.cls();
+        pi.locate(0,0);
+        pi.printf("a:%f", delta_a);
+        timerWait(1.5);
         left(delta_a);
 
         /* Put pen into position. */
@@ -215,10 +215,10 @@
         if (dist < 0) {
             dist *= -1;
         }
-        //pi.cls();
-        //pi.locate(0,0);
-        //pi.printf("d:%f", 0.4*cal_time*(dist/(double)dim_x));
-        //timerWait(1.5);
+        pi.cls();
+        pi.locate(0,0);
+        pi.printf("d:%f", 0.4*cal_time*(dist/(double)dim_x));
+        timerWait(1.5);
         forward(0.4*cal_time*(dist/(double)dim_x));
 
         last_x = x;