wakaran

Dependencies:  

Revision:
0:17acb05d7f3e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test.cpp	Thu Feb 24 07:22:30 2022 +0000
@@ -0,0 +1,20 @@
+#include<mbed.h>
+#include<IMC_motorDrive.hpp>
+#include<F446RE_usefulConstruct.h>
+#include<nap.hpp>
+
+const float dt = 0.02;
+NAP nap(dt);
+
+Serial pc(USBTX,USBRX);
+
+IMC_motor motor(com[10],256,100*M_PI,com[3],20,10,dt);
+int main(){
+    pc.baud(115200);
+    nap.restart();
+    while(1){
+        motor.IMCdrive(300);
+        nap.take_a_nap();
+        pc.printf("%lf[rpm] pwm=%lf pmv=%lf\n",motor.motor_enc.getSpeed(),motor.out_pwm,motor.process_model_val);
+    }
+}
\ No newline at end of file