motor controller with P velocity control
Dependencies: HIDScope PID QEI mbed EMG
Fork of PID_VelocityExample by
Diff: inits.h
- Revision:
- 18:4ee32b922251
- Parent:
- 17:034b50f49f46
- Child:
- 19:3ca10fe26131
diff -r 034b50f49f46 -r 4ee32b922251 inits.h --- a/inits.h Wed Oct 07 12:19:30 2015 +0000 +++ b/inits.h Wed Oct 07 13:19:25 2015 +0000 @@ -1,7 +1,7 @@ //****************************************************************************/ // Defines //****************************************************************************/ -#define RATE 0.05 +#define RATE 0.01 #define calcRATE 0.5 #define Kc 1.5 #define Ti 0.8 @@ -44,7 +44,6 @@ float thistime; bool goFlag=false; bool calcFlag=false; -bool didCalc=false; bool systemOn=false; // Working variables: motors @@ -80,7 +79,7 @@ float toRightAngle; const double M_PI =3.141592653589793238463; const float l = 100; // distance between the motors -const float armlength=150; // length of the arms from the motor +const float armlength=50; // length of the arms from the motor void initMotors(){ //Initialization of motor