Motor control, feedback, PI controller, BiQuad filter
Dependencies: FastPWM HIDScope MODSERIAL biquadFilter mbed QEI
Diff: main.cpp
- Revision:
- 22:2a560f0f1671
- Parent:
- 21:9ba0ed42ee42
- Child:
- 24:f9dccbc1fc7e
diff -r 9ba0ed42ee42 -r 2a560f0f1671 main.cpp --- a/main.cpp Wed Oct 31 15:48:53 2018 +0000 +++ b/main.cpp Wed Oct 31 19:42:55 2018 +0000 @@ -6,6 +6,7 @@ MODSERIAL pc(USBTX, USBRX); DigitalOut motor1DirectionPin(D7); DigitalOut motor2DirectionPin(D4); +DigitalOut Led(LED_GREEN); FastPWM motor1MagnitudePin(D6); FastPWM motor2MagnitudePin(D5); AnalogIn potMeter1(A4); @@ -181,10 +182,12 @@ MeasureControl1.attach(MeasureAndControl1, 0.01); MeasureControl2.attach(MeasureAndControl2, 0.01); - print.attach(printen, 3); + print.attach(printen, 1.0); //Other initializations while(true) { + Led = !Led; + wait(2); } }