cube
Dependencies: BNO055_fusion_tom FastPWM mbed
Diff: main.cpp
- Revision:
- 28:0b0b258eef75
- Parent:
- 27:240ce092615c
- Child:
- 29:137559beea74
--- a/main.cpp Wed Apr 19 05:31:19 2017 +0000 +++ b/main.cpp Thu Apr 20 23:49:04 2017 +0000 @@ -26,9 +26,10 @@ BNO055_ID_INF_TypeDef bno055_id_inf; BNO055_EULER_TypeDef euler_angles; BNO055_VEL_TypeDef velocity; -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 Kbt = -66.9102;//-65.9945; //-72.4921;//-67.9056;//-92.4921;//-89.9276; +double Kbv = -9.1752;//-9.2202; //-9.9672;//-11.4004;//-13.8353;//-9.9672; //-14.9398; +double Kwv = -0.00558; //-0.1164; //-0.00025; // +double speed; double wv; double bt; double bv; @@ -42,8 +43,8 @@ { //myled = !myled; - wv = I1.read(); // Converts and read the analog input value (value from 0.0 to 1.0) - wv = (wv-0.5)*(5000/0.5); // Scale the velocity to rad/s + speed = I1.read(); // Converts and read the analog input value (value from 0.0 to 1.0) + wv = (speed-0.5)*(5000/0.5); // Scale the velocity to rad/s bt = ((euler_angles.p) + (pi/4)); bv = -1.0*velocity.z;