paling baru

Dependencies:   DigitDisplay Motor PID Ping mbed millis

Fork of MainProgram_BaseBaru_fix_omni_11April by KRAI 2017

Revision:
14:6d389e99981c
Parent:
13:8ab42383a2ca
Child:
15:98f0d56b14f0
--- a/main.cpp	Fri Dec 09 10:27:56 2016 +0000
+++ b/main.cpp	Fri Dec 09 10:50:40 2016 +0000
@@ -76,18 +76,18 @@
 encoderKRAI encoderKiri( PC_11, PC_10, 2000, encoderKRAI::X2_ENCODING);
 
 // Deklarasi variabel motor
-Motor motor1(PA_8, PB_0 , PC_15); // pwm, fwd, rev
-Motor motor2(PA_11, PA_6 ,PA_5); // pwm, fwd, rev
-Motor motor3(PA_9, PC_2 , PC_3); // pwm, fwd, rev
-Motor motor4(PA_10, PB_5 ,PB_4); // pwm, fwd, rev
+Motor motor1(PB_7, PA_14 , PA_15); // pwm, fwd, rev
+Motor motor2(PB_8, PA_13 ,PB_0); // pwm, fwd, rev
+Motor motor3(PB_3, PA_12 , PC_5); // pwm, fwd, rev
+Motor motor4(PB_6, PB_1 ,PB_12); // pwm, fwd, rev
 
 //Motor Atas
-Motor motorld(PB_8, PB_1 , PA_13); // pwm, fwd, rev
-Motor motorlb(PB_9, PA_12, PC_5 ); // pwm, fwd, rev
+Motor motorld(PA_8, PC_1 , PC_2); // pwm, fwd, rev
+Motor motorlb(PA_9, PA_4, PC_15 ); // pwm, fwd, rev
 
 //Servo Atas
-Servo servoS(PC_9);
-Servo servoB(PC_7);
+Servo servoS(PB_2);
+Servo servoB(PA_5);
 
 // Deklarasi variabel posisi robot
 //robotPos posisi();
@@ -273,7 +273,7 @@
             pivka=true;         
             maju=mundur=analog=kiri=kanan=saka=saki=sbka=sbki=pivki=cw1=ccw1=cw2=ccw2=cw3=ccw3=false;
             
-            pc.printf("pivKa  Xt =%.2f x=%.2f YT=%.2f y=%.2f errx=%.2f erry=%.2f \n",XT,x,YT,y,errX,errY);
+//            pc.printf("pivKa  Xt =%.2f x=%.2f YT=%.2f y=%.2f errx=%.2f erry=%.2f \n",XT,x,YT,y,errX,errY);
             
          
             break;
@@ -285,7 +285,7 @@
             pivki=true; 
             maju=mundur=kiri=analog=kanan=saka=saki=sbka=sbki=pivka=cw1=ccw1=cw2=ccw2=cw3=ccw3=false;
             
-            pc.printf("pivKi  Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
+ //           pc.printf("pivKi  Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
             
          
             break;
@@ -297,7 +297,7 @@
             maju=true;             
             mundur=kiri=kanan=saka=saki=sbka=sbki=analog=pivka=pivki=cw1=ccw1=cw2=ccw2=cw3=ccw3=false;
 
-            pc.printf("maju Xt =%.2f x=%.2f YT=%.2f y=%.2f  errx=%.2f erry=%.2f \n",XT,x,YT,y,errX,errY);
+//            pc.printf("maju Xt =%.2f x=%.2f YT=%.2f y=%.2f  errx=%.2f erry=%.2f \n",XT,x,YT,y,errX,errY);
 
             break;
         }
@@ -308,7 +308,7 @@
             mundur=true; 
             maju=kiri=kanan=saka=saki=sbka=sbki=analog=pivka=pivki=cw1=ccw1=cw2=ccw2=cw3=ccw3=false;
 
-            pc.printf("mundur Xt =%.2f x=%.2f YT=%.2f y=%.2f errx=%.2f erry=%.2f \n",XT,x,YT,y,errX,errY);
+  //          pc.printf("mundur Xt =%.2f x=%.2f YT=%.2f y=%.2f errx=%.2f erry=%.2f \n",XT,x,YT,y,errX,errY);
 
     
             break;
@@ -321,7 +321,7 @@
             saka=true; 
             maju=mundur=kiri=kanan=sbka=saki=sbki=analog=pivka=pivki=cw1=ccw1=cw2=ccw2=cw3=ccw3=false;
             
-            pc.printf("saka Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
+  //          pc.printf("saka Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
             
             
             break;
@@ -335,7 +335,7 @@
             sbka=true; 
             maju=mundur=kiri=kanan=saka=saki=sbki=analog=pivka=pivki=cw1=ccw1=cw2=ccw2=cw3=ccw3=false;
             
-            pc.printf("sbka  Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
+  //          pc.printf("sbka  Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
 
     
             break;
@@ -349,7 +349,7 @@
             saki=true; 
             maju=kiri=kanan=saka=mundur=sbka=sbki=analog=pivka=pivki=cw1=ccw1=cw2=ccw2=cw3=ccw3=false;
             
-            pc.printf("saki Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
+  //          pc.printf("saki Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
             
     
             break;
@@ -359,7 +359,7 @@
            XT = XT - 0.1;
            YT = YT - 0.1;
          
-            pc.printf("sbki Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
+ //           pc.printf("sbki Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
             
     
             break;
@@ -370,7 +370,7 @@
             kanan=true; 
             maju=kiri=mundur=saka=saki=sbka=sbki=analog=pivka=pivki=cw1=ccw1=cw2=ccw2=cw3=ccw3=false;
             
-            pc.printf("Kanan Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
+   //         pc.printf("Kanan Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
             
             break;
         }
@@ -381,7 +381,7 @@
             kiri=true; 
             maju=kanan=mundur=saka=saki=sbka=sbki=analog=pivka=pivki=cw1=ccw1=cw2=ccw2=cw3=ccw3=false;
             
-            pc.printf("Kiri Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
+   //         pc.printf("Kiri Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
             
               
             break;
@@ -395,7 +395,7 @@
             analog=true;
             maju=mundur=kiri=kanan=saka=saki=sbka=sbki=cw1=ccw1=cw2=ccw2=cw3=ccw3=false;
             
-            pc.printf("analog  Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
+  //          pc.printf("analog  Xt =%.2f x=%.2f YT=%.2f y=%.2f \n",XT,x,YT,y);
             
             break;
     }