cube
Dependencies: BNO055_fusion_tom FastPWM mbed
Diff: main.cpp
- Revision:
- 27:240ce092615c
- Parent:
- 26:6ffb048f45ae
- Child:
- 28:0b0b258eef75
--- a/main.cpp Mon Apr 17 06:19:18 2017 +0000 +++ b/main.cpp Wed Apr 19 05:31:19 2017 +0000 @@ -26,9 +26,9 @@ BNO055_ID_INF_TypeDef bno055_id_inf; BNO055_EULER_TypeDef euler_angles; BNO055_VEL_TypeDef velocity; -double Kbt = -72.4921;//-67.9056;//-92.4921;//-89.9276; -double Kbv = -9.9672;//-11.4004;//-13.8353;//-9.9672; //-14.9398; -double Kwv = -0.00025; //-0.0909; +double Kbt = -65.9945; //-72.4921;//-67.9056;//-92.4921;//-89.9276; +double Kbv = -9.2202; //-9.9672;//-11.4004;//-13.8353;//-9.9672; //-14.9398; +double Kwv = -0.000661; //-0.1164; //-0.00025; // double wv; double bt; double bv; @@ -43,7 +43,7 @@ //myled = !myled; wv = I1.read(); // Converts and read the analog input value (value from 0.0 to 1.0) - wv = (wv-1.65)*(5000/1.65); // Scale the velocity to rad/s + wv = (wv-0.5)*(5000/0.5); // Scale the velocity to rad/s bt = ((euler_angles.p) + (pi/4)); bv = -1.0*velocity.z;