Aaron Berk
/
PID_VelocityExample
Proportional, integral, derivative velocity control of a motor.
Diff: main.cpp
- Revision:
- 1:ac598811dd00
- Parent:
- 0:9bca35ae9c6b
--- 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);