Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Encoder HIDScope MODSERIAL mbed-dsp mbed
Fork of BMT-M9_motorcontrol_groep3 by
Diff: main.cpp
- Revision:
- 2:5f5b229b004d
- Parent:
- 1:5ac85aad9da4
- Child:
- 4:1a53b06eeb7f
--- a/main.cpp	Thu Sep 26 13:08:21 2013 +0000
+++ b/main.cpp	Tue Oct 08 14:55:40 2013 +0000
@@ -60,8 +60,8 @@
         while(!looptimerflag);
         looptimerflag = false;
         setpoint = (getpotAverage())*2000;
-        new_pwm = (setpoint - motor1.getPosition())*.001;
-        //new_pwm = pid(setpoint, motor1.getPosition());
+        //new_pwm = (setpoint - motor1.getPosition())*.001;
+        new_pwm = pid(setpoint, motor1.getPosition());
         coerce(&new_pwm, -1,1);
         if(new_pwm > 0)
             motordir = 1;
    