motor controller with P velocity control

Dependencies:   HIDScope PID QEI mbed EMG

Fork of PID_VelocityExample by Aaron Berk

Revision:
1:ac598811dd00
Parent:
0:9bca35ae9c6b
Child:
2:b2ccd9f044bb
diff -r 9bca35ae9c6b -r ac598811dd00 main.cpp
--- a/main.cpp	Tue Aug 03 09:24:06 2010 +0000
+++ b/main.cpp	Sat Nov 27 11:37:20 2010 +0000
@@ -89,7 +89,7 @@
         leftVelocity = (leftPulses - leftPrevPulses) / RATE;
         leftPrevPulses = leftPulses;
         leftController.setProcessValue(leftVelocity);
-        leftPwmDuty = leftController.getRealOutput();
+        leftPwmDuty = leftController.compute();
         leftMotor = leftPwmDuty;
         fprintf(fp, "%f,%f\n", leftVelocity, goal);
         wait(RATE);