Micromouse 18
/
encoder
encoder
Revision 6:71829ae2ee07, committed 2017-11-11
- Comitter:
- kensterino
- Date:
- Sat Nov 11 03:05:20 2017 +0000
- Parent:
- 5:a49a77ddf4e3
- Commit message:
- got checked off. mostly straight. should be optimized;
Changed in this revision
PID_control.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r a49a77ddf4e3 -r 71829ae2ee07 PID_control.cpp --- a/PID_control.cpp Sat Nov 11 01:02:29 2017 +0000 +++ b/PID_control.cpp Sat Nov 11 03:05:20 2017 +0000 @@ -3,14 +3,14 @@ QEI encoder_Right(PB_3, PA_15, NC, 360, QEI::X4_ENCODING); QEI encoder_Left(PA_1, PC_4, NC, 360, QEI::X4_ENCODING); -double Kp = .005; -double Ki = 0.0000001; +double Kp = 0.3;//.005; +double Ki = 0.001;//0.0000001; double Kd = 0.001; PwmOut m_Right_F(PB_10); PwmOut m_Right_B(PC_7); PwmOut m_Left_F(PA_7); PwmOut m_Left_B(PB_6); -double i_speed = 0.1; +double i_speed = 0.3; double C_speed(0); int integrator = 0; int decayFactor = 1;