Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of circle_war_ver_A_NUCLEO_ by
Diff: speed_control.h
- Revision:
- 11:f8fac9693cd5
- Parent:
- 9:92ddadd9e9a9
- Child:
- 14:3403ce49a37a
--- a/speed_control.h Mon Apr 04 08:43:50 2016 +0000 +++ b/speed_control.h Mon Apr 04 08:55:04 2016 +0000 @@ -2,6 +2,25 @@ #ifndef SPEED_CONTROL_H #define SPEED_CONTROL_H + +float angle_f=0.0,angle_r=0.0,angle_l=0.0; +float angle_old_f=0.0,angle_old_r=0.0,angle_old_l=0.0; +float duty_out_f=0.0,duty_out_r=0.0,duty_out_l=0.0; +float duty_PID_f=0.0,duty_PID_r=0.0,duty_PID_l=0.0; +float omega_now_f=0.0,omega_now_r=0.0,omega_now_l=0.0; +float rot_now_f=0.0,rot_now_r=0.0,rot_now_l=0.0; +float rot_old_f=0.0,rot_old_r=0.0,rot_old_l=0.0; +float rot_PID_f=0.0,rot_PID_r=0.0,rot_PID_l=0.0; +float rot_prop_f=0.0,rot_prop_r=0.0,rot_prop_l=0.0; +float rot_diff_f=0.0,rot_diff_r=0.0,rot_diff_l=0.0; +float rot_inte_f=0.0,rot_inte_r=0.0,rot_inte_l=0.0; +int dir_f,dir_r,dir_l; +const float Kp_f=30.0000f,Kd_f=200.0000f,Ki_f=0.0001f; +const float Kp_r=30.0000f,Kd_r=200.0000f,Ki_r=0.0001f; +const float Kp_l=30.0000f,Kd_l=200.0000f,Ki_l=0.0001f; +const float resolution=1024.0; +int t=0; +/* extern float angle_f,angle_r,angle_l; extern float angle_old_f,angle_old_r,angle_old_l; extern float duty_out_f,duty_out_r,duty_out_l; @@ -24,5 +43,7 @@ extern const float resolution; extern int t; +*/ +void motor_setting(); #endif \ No newline at end of file