Bring down Resolution to have a easier code. We could give it a shot. I think it will help our Identification of DC motor for it can run faster (maybe).
Dependencies: mbed
Diff: ID_motor.cpp
- Revision:
- 1:307e6821d26f
- Parent:
- 0:aa69084e1cae
--- a/ID_motor.cpp Mon Mar 20 15:32:29 2017 +0000 +++ b/ID_motor.cpp Mon Mar 20 15:49:39 2017 +0000 @@ -122,9 +122,13 @@ rotation_speed_1 = (float)speed_count_1*100.0f/ 12.0f* 60.0f/ 29.0f ; // unit: rpm speed_count_1 = 0 ; // initialize for another time pc.printf("Wm1 = %f (rpm) \n", rotation_speed_1) ; // Serial print to know Wm + // read Data to Matlab + // pc.printf("%f ",rotation_speed_1); // monitor for motor 2 rotation_speed_2 = (float)speed_count_2*100.0f/ 12.0f* 60.0f/ 29.0f ; // unit: rpm speed_count_2 = 0 ; // initialize for next time pc.printf("Wm2 = %f (rpm) \n", rotation_speed_2) ; // Serial print to know Wm +// read Data to Matlab +//pc.printf("%f ", rotation_speed_2) ; } \ No newline at end of file