PID Motor Position Control using ESP8266 WiFi Module, US Digital E4P-100-079, LMD18200 H-Bridge Break Out, and HN-GH12-1634T 30:1 200RPM Motor
Dependencies: 4DGL-uLCD-SE PID QEI SDFileSystem mbed ESP8266_pid_mtrPos_webserver_SDcard_v2
Dependents: ESP8266_pid_mtrPos_webserver_SDcard_v2
Diff: main.cpp
- Revision:
- 5:2c728eb9bc80
- Parent:
- 3:6067780e2f45
- Child:
- 6:fc421a6d5e7e
--- a/main.cpp Wed Nov 25 02:13:19 2015 +0000 +++ b/main.cpp Wed Nov 25 02:32:40 2015 +0000 @@ -71,10 +71,11 @@ const float output_upper_limit = 1.0; const float FEEDBACK_SCALE = 1.0/3000.0; // Scale feedback to 1rev/3000cnts // this is encoder specific. +// Initialize Webpage to these values const float setpoint_init = 0.0; const float kp_init = 2.5; const float ki_init = 5.0; -const float kd_init = 0.5; +const float kd_init = 0.25; const float Ts_init = 0.04; // 25Hz Sample Freq (40ms Sample Time) PID pid(&setpoint, &feedback, &output, output_lower_limit, output_upper_limit,