
CLOSED LOOP BASE
Dependencies: Motor PID mbed millis
Revision 1:7d3041941b1b, committed 2017-05-29
- Comitter:
- gustavaditya
- Date:
- Mon May 29 15:46:48 2017 +0000
- Parent:
- 0:57124be75a63
- Commit message:
- CLOSED LOOP BASE
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 57124be75a63 -r 7d3041941b1b main.cpp --- a/main.cpp Mon May 29 15:43:42 2017 +0000 +++ b/main.cpp Mon May 29 15:46:48 2017 +0000 @@ -28,7 +28,18 @@ #define PI 3.14159265 #define D_ENCODER 10 // Diameter Roda Encoder -#define D_ROBOT 80 // Diameter Roda Robot +#define D_ROBOT 55 // Diameter Roda Robot + +float K_enc = PI*D_ENCODER; +float K_robot = PI*D_ROBOT; + +float speed1=0.6; +float speed2=0.6; +float speed3=0.6; +float speed4=0.6; + +float errX, errY, errT, Vt, Vx, Vy, KpX=1.5, KpY=1.5, Kp_tetha=0.15; +float V1, V2, V3, V4; // Variable Bawah float tuneDpn = 1.0; // Tunning PWM motor Depan