Basic DC motor control test, rpm feedback by simple impulse signal, PID speed control.
Dependencies: FastPWM mbed FastIO MODSERIAL
Revision 10:c28d133a1408, committed 2018-04-03
- Comitter:
- dzoni
- Date:
- Tue Apr 03 12:49:11 2018 +0000
- Parent:
- 9:486eeba3950f
- Child:
- 11:4747badb2448
- Commit message:
- Doxy docs.
Changed in this revision
| PID.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/PID.lib Wed Mar 28 13:22:09 2018 +0000 +++ b/PID.lib Tue Apr 03 12:49:11 2018 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/dzoni/code/PID/#125d04fbce1d +https://os.mbed.com/users/dzoni/code/PID/#00ec98597c85
--- a/main.cpp Wed Mar 28 13:22:09 2018 +0000
+++ b/main.cpp Tue Apr 03 12:49:11 2018 +0000
@@ -101,9 +101,9 @@
tStamp = myTimer.read_high_resolution_us();
DO_TASK(periodLEDBlink, tStampLEDBlink, tStamp, &tskLEDBlink);
- DO_TASK(periodPWMWrite, tStampPWMWrite, tStamp, &tskPWMWrite);
DO_TASK(periodImpSens, tStampImpSens, tStamp, &tskImpSens);
DO_TASK(periodRPMSetpoint, tStampRPMSetpoint, tStamp, &tskRPMSetpoint);
+ DO_TASK(periodPWMWrite, tStampPWMWrite, tStamp, &tskPWMWrite);
BACKGROUND(&tskBackground);
}
@@ -111,7 +111,12 @@
// LOCAL MODULE DEFINITIONS
-// Initialization
+/**
+ * @brief System initialization - called at the prologue of main().
+ * @note None.
+ *
+ * Caries out system level initialization at the beginning of the main().
+ */
void setup(void)
{
pcLink.baud(115200);