mencari respon motor launcher dengan fungsi step

Dependencies:   Motor mbed millis

Fork of transfer_function_motor by KRAI 2017

Revision:
1:3a234ff1442b
Parent:
0:be14d75c8037
Child:
2:8f1bb7191680
diff -r be14d75c8037 -r 3a234ff1442b main.cpp
--- a/main.cpp	Thu Feb 16 16:24:30 2017 +0000
+++ b/main.cpp	Thu Feb 16 16:25:31 2017 +0000
@@ -3,7 +3,7 @@
 #include "Motor.h"
 #include "millis.h"
  
-encoderKRAI encoder( PB_13, PB_14, 14, encoderKRAI::X2_ENCODING);
+encoderKRAI encoder( PB_13, PB_14, 14, encoderKRAI::X4_ENCODING);
 Serial pc(USBTX,USBRX);
 Motor motor(PA_8,PC_1,PC_2);
 
@@ -23,7 +23,7 @@
         currentMillis = millis();
         
         
-        if (currentMillis-previousMillis>=100)
+        if (currentMillis-previousMillis>=10)
         {
             rpm = (double)encoder.getPulses();