![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
begin van episch avontuur
Diff: main.cpp
- Revision:
- 3:329acce2487c
- Parent:
- 2:821ae727bf8c
- Child:
- 4:95bf97b44237
diff -r 821ae727bf8c -r 329acce2487c main.cpp --- a/main.cpp Tue Oct 31 12:16:16 2017 +0000 +++ b/main.cpp Tue Oct 31 13:26:52 2017 +0000 @@ -30,7 +30,7 @@ double L3 = 0.150; // reference position -double q1=0; // positie q2 in radialen +double q1=0; // positie q1 in radialen double q2=0; // positie q2 in radialen double q1_pos; double q2_pos; @@ -54,6 +54,7 @@ double Kp; // proportional coefficient ( double Kd; // differential coefficient +double Ki; // integrating coefficient void wasd() @@ -191,8 +192,8 @@ { pc.baud(115200); pulses2rad=(2*pi)/4200; - Kp = 2.5; - Kd = 0.2*Kp; + Kp = 100; + Ki = ; tick_sample.attach_us(&aansturing, 1000); //sample frequency 1000 Hz; tick_wasd.attach(&wasd, 0.1); led_g = 0;