This is with minumum of 10 milliseconds threshold delay 00:53

Dependencies:   biquadFilter MODSERIAL QEI Servo mbed

Fork of StateMachine_EMg_RKI_PID_MOTOR_metklikenalles by Gaston Gabriël

Revision:
12:99e29b8d4155
Parent:
11:4ee7f6d482f4
Child:
13:0e25698dce40
--- a/main.cpp	Thu Nov 01 17:41:25 2018 +0000
+++ b/main.cpp	Thu Nov 01 17:51:37 2018 +0000
@@ -48,8 +48,8 @@
 
 
 // PID  CONTROLLER     --        PIN DEFENITIONS 
-AnalogIn button3(A4);
-AnalogIn button4(A5);
+//AnalogIn button3(A4);
+//AnalogIn button4(A5);
 
 DigitalOut directionpin1(D7);   // motor 1
 DigitalOut directionpin2(D4);   // motor 2
@@ -720,8 +720,8 @@
     led3 = 1;
     
     pwmpin1.period_us(60); // setup motor
-    ref_rot.attach(Motor_mover, 0.1f);// HAS TO GO TO STATE MACHINE
-    movement_ticker_activator()
+    ref_rot.attach(Motor_mover, 0.01f);// HAS TO GO TO STATE MACHINE
+    movement_ticker_activator();
     while (true) {
         //ProcessStateMachine();
         
@@ -741,7 +741,7 @@
             float py = positiony(0,0);  // EMG: +y, -y
             //printf("positie (%f,%f)\n\r",px,py);
         }
-
+/*
         if (button3 == false) {
             wait(0.01f);
             // berekenen positie
@@ -757,7 +757,7 @@
             float py = positiony(0,1);  // EMG: +y, -y
             //printf("positie (%f,%f)\n\r",px,py);
         }
-
+*/
     }
 
 }