kom op

Dependencies:   QEI mbed

Revision:
1:7969189824ff
Parent:
0:921402a95675
Child:
2:0686b2132556
--- a/main.cpp	Wed Nov 01 16:16:04 2017 +0000
+++ b/main.cpp	Thu Nov 02 09:20:15 2017 +0000
@@ -45,7 +45,7 @@
 {   
     refrad2 =  1.57f*sin(t.read()); //motor 2
     ref2 = refrad2 * rad2pulses;   
-    refrad1 = -0.6f*cos(t.read()) + 0.2f; //motor 1
+    refrad1 = -0.5f*cos(t.read()) + 0.6f; //motor 1
     ref1 = refrad2 * rad2pulses;
     
     // encoders uitlezen    
@@ -82,16 +82,16 @@
     if (PI2>=0)
     {
     motor2DirectionPin = 1;
-    motor2MagnitudePin = fabs(PI2);   
+    //motor2MagnitudePin = fabs(PI2);   
     }
     else if(PI2<0)
     {
     motor2DirectionPin = 0;
-    motor2MagnitudePin = fabs(PI2);               
+    //motor2MagnitudePin = fabs(PI2);               
     }
     
     if(n==500){         
-    printf("PI1 = %f\n\r", PI1);
+    printf("error1 = %f   error2 = %f\n\r", error1_1, error1_2);
     n=0;
     }
     else{