
Kan kaart oppakken, maar duurt wel lang.
Dependencies: Encoder HIDScope MODSERIAL mbed
Fork of week6ordenenscript by
Diff: main.cpp
- Revision:
- 17:767cacdd0b1d
- Parent:
- 16:4bfcc154bba0
--- a/main.cpp Fri Nov 03 01:14:58 2017 +0000 +++ b/main.cpp Fri Nov 03 10:29:05 2017 +0000 @@ -17,7 +17,7 @@ MODSERIAL pc(USBTX,USBRX); float PwmPeriod = 1.0/5000.0; //set up of PWM periode (5000 Hz, want 5000 periodes in 1 seconde) -const float Ts = 0.1; // tickettijd/ sample time +const float Ts = 0.02; // tickettijd/ sample time float e_prev = 0; float e_int = 0; @@ -105,6 +105,7 @@ } else { //de y-waarde van de setpoint verandert niet } + //pc.printf("potmeter1 = %f, potmeter2 = %f \r\n", potMeter1.read(), potMeter2.read()); } float GetReferencePosition() @@ -219,6 +220,7 @@ void MeasureAndControl(void) { + pc.printf("pot1 = %f, pot2 = %f, Rsx = %f, Rsy = %f \r\n", potMeter1.read(), potMeter2.read(), Rsx, Rsy); SetpointRobot(); // RKI aanroepen RKI();