alles ingevoegd
Dependencies: FastPWM HIDScope MODSERIAL QEI mbed biquadFilter
Fork of deelPID by
Diff: main.cpp
- Revision:
- 2:58ec7347245e
- Parent:
- 1:23834862b877
- Child:
- 3:53fb8bd0a448
diff -r 23834862b877 -r 58ec7347245e main.cpp --- a/main.cpp Tue Oct 30 15:57:25 2018 +0000 +++ b/main.cpp Wed Oct 31 08:04:10 2018 +0000 @@ -6,15 +6,15 @@ DigitalOut gpo(D0); DigitalOut led(LED_RED); -AnalogIn pot1(A0); //POORTEN VERANDEREN -AnalogIn pot2(A1); //POORTEN veranderen -AnalogIn pot3(A2); //POORTEN VERANDEREN +AnalogIn pot1(A4); //POORTEN VERANDEREN +//AnalogIn pot2(); //Beneden is I control op 0 gezet. //POORTEN veranderen +AnalogIn pot3(A5); //POORTEN VERANDEREN QEI encoder1(D10, D11, NC, 32); QEI encoder2(D12, D13, NC, 32); FastPWM Motor1PWM(D6); DigitalOut Motor1Direction(D7); -FastPWM Motor2PWM(D5); //!!!!! Juiste poorten aangeven -DigitalOut Motor2Direction(D4); //!!!!! Juiste poort aangeven +FastPWM Motor2PWM(D5); +DigitalOut Motor2Direction(D4); //EMG AnalogIn a0(A0); AnalogIn a1(A1); @@ -399,7 +399,7 @@ scope.set(1, q1Ref); GainP1 = pot3.read() * 10; - GainI1 = pot2.read() * 10; + GainI1 = 0; //pot2.read() * 10; GainD1 = pot1.read() ; countstep++;