QQQQQQQ

Dependencies:   mbed

Fork of 7_7Boboobooo by 譯文 張

Revision:
6:b046d6ff3745
Parent:
3:c5f2281b3ed2
Child:
7:f04bde0ca846
--- a/main.cpp	Thu Jun 05 10:32:55 2014 +0000
+++ b/main.cpp	Mon Jul 07 08:16:46 2014 +0000
@@ -2,14 +2,15 @@
 #include "servo_api.h"
 #include "camera_api.h"
 
-
+#include "motor_api.h"
 #define Debug_cam_uart
 
-
+//middle 0.041
 Serial pc(USBTX, USBRX);
 BX_servo servo; 
- 
-    BX_camera cam;
+BX_camera cam;
+BX_motor MotorA('A');
+BX_motor MotorB('B');
 
 
 
@@ -19,6 +20,7 @@
     int black_va;
     int white_va;
     */
+    double Kp = 0.0;
     
 #ifdef Debug_cam_uart
      pc.baud(115200);
@@ -26,9 +28,11 @@
      
   while(1){   
      
-      cam.read();
-         
-        for(int i=0;i<128;i++){
+        cam.read();
+        MotorA.rotate(0.0);
+        MotorB.rotate(0.0);
+        servo.set_angle(0.051);
+        /*for(int i=0;i<128;i++){
              if(i==64)
                pc.printf("X");
              else          
@@ -42,13 +46,7 @@
              else          
                pc.printf("%c", cam.sign_line_imageR[i]);
          }
-         pc.printf("\r\n");
-     
-
-
-        pc.printf("R center : %d  \r\nL center: %d\r\n",cam.black_centerR(),cam.black_centerL());
-
-
+         pc.printf("\r\n");*/
        }