encoder

Dependencies:   QEI mbed

Revision:
6:71829ae2ee07
Parent:
5:a49a77ddf4e3
--- 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;