2

Dependencies:   AQM0802A HMC6352 PID Servo mbed

Revision:
4:f7946508daa8
Parent:
3:0c994b3a882e
Child:
5:dace4f3b6e4a
--- a/main.h	Mon Mar 02 05:55:33 2015 +0000
+++ b/main.h	Tue Mar 03 02:36:28 2015 +0000
@@ -1,13 +1,13 @@
 
 /*PID処理*/
-#define RATE    0.18//52
-#define PID_BIAS    0.3
+#define RATE    0.052//52
+#define PID_BIAS    0.1
 #define REFERENCE   180.0
 #define MINIMUM     0.1
 #define MAXIMUM     360.0
 #define P_GAIN  1.8//1.4    //0.78   
 #define I_GAIN  0.0     //0.0
-#define D_GAIN  0.05  //0.009
+#define D_GAIN  0.03  //0.009
 #define OUT_LIMIT   50.0
 #define MAX_POW     100
 #define MIN_POW     -100
@@ -30,6 +30,9 @@
 
 #define CW 1
 #define CCW -1
+#define ENTER   0
+#define EXIT    1
+
 
 BusIn   Sw(p22,p23,p24,p25,p26);
 BusIn   Line(p5,p6,p7,p8);//No reading line → 0b1111 ,not pull up