PID Controller
Dependencies: HIDScope MODSERIAL PinDetect QEI biquadFilter
main.h
- Committer:
- AeroKev
- Date:
- 2015-10-19
- Revision:
- 1:fe23126b0389
- Parent:
- 0:d38eb4622914
File content as of revision 1:fe23126b0389:
PinName m1_enc_a = D12; PinName m1_enc_b = D13; PinName m1_pwm = D6; PinName m1_dir = D7; PinName m2_enc_a = D11; PinName m2_enc_b = D10; PinName m2_pwm = D5; PinName m2_dir = D4; PinName m2_pot = A0; PinName m1_pot = A1; const double pid_upper_limit = 1, pid_lower_limit = 0; const double motor1_kp = 0.75f, motor1_ki = 0.001f, motor1_kd = 0.005f; const double motor2_kp = 0.75f, motor2_ki = 0.001f, motor2_kd = 0.005f; const double m1_f_a1 = 1.0, m1_f_a2 = 2.0, m1_f_b0 = 1.0, m1_f_b1 = 3.0, m1_f_b2 = 4.0; const double m2_f_a1 = 1.0, m2_f_a2 = 2.0, m2_f_b0 = 1.0, m2_f_b1 = 3.0, m2_f_b2 = 4.0; int sigPerRev = 4192; float tickRate = 0.01f; float graphTickRate = 0.01f; float toRadians(int pulses);