practice for PID control

Dependencies:   PID QEI USBDevice mbed

Files at this revision

API Documentation at this revision

Comitter:
NT32
Date:
Fri May 02 04:57:04 2014 +0000
Parent:
5:f668eb3ee52a
Commit message:
???

Changed in this revision

SDFileSystem.lib Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r f668eb3ee52a -r 1250bc2df075 SDFileSystem.lib
--- a/SDFileSystem.lib	Fri May 02 04:47:47 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/SDFileSystem/#7b35d1709458
diff -r f668eb3ee52a -r 1250bc2df075 main.cpp
--- a/main.cpp	Fri May 02 04:47:47 2014 +0000
+++ b/main.cpp	Fri May 02 04:57:04 2014 +0000
@@ -2,7 +2,6 @@
 #include "USBSerial.h"
 #include "QEI.h"
 #include "PID.h"
-#include "SDFileSystem.h"
 
 #define     PIDRATE 0.01
 #define     CW      0x01
@@ -97,7 +96,7 @@
     epls[0] = 0;
     timer.reset();
     timer.start();
-    vcom.printf("%d,%d,%f\n" , timer.read_ms(), dac.bit.D, rps);
+    vcom.printf("%d,%d,%f\n" , timer.read_ms(), rps, dac.bit.D);
     i = 0;
     while(1)
     {
@@ -107,7 +106,7 @@
             pidsetup();
             timer.reset();
             timer.start();
-            vcom.printf("%d,%d,%f\n" , timer.read_ms(), dac.bit.D, rps);
+            vcom.printf("%d,%d,%f\n" , timer.read_ms(), rps, dac.bit.D);
         }
 
         i++;
@@ -249,10 +248,7 @@
     
     vcom.printf("\033[2J");
     vcom.printf("\033[%d;%dH", 0, 0);
-    
-    
-    
         
     //PID mode
     controller.setMode(AUTO_MODE);
-}
\ No newline at end of file
+}