LPC824's Program for RoboCup 2016 Leipzig

Dependencies:   mbed-src Ping SDFileSystem

Revision:
0:3e24cf7f8a27
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main/def.h	Tue Jun 14 07:24:23 2016 +0000
@@ -0,0 +1,56 @@
+#ifndef _DEF_H_
+#define _DEF_H_
+
+//3つの内どれか一つを定義する.
+//#define ULTRA_SONIC//HC-SR04
+//#define ULTRA_SONIC_2//HC-SR04_on_DebugBoard
+#define IR_SENSOR//MCP3208
+
+#if defined(ULTRA_SONIC) || defined(ULTRA_SONIC_2)
+
+#endif /*(ULTRA_SONIC) || (ULTRA_SONIC_2)*/
+
+#ifdef IR_SENSOR
+    
+    #define IC_NUM 3
+    #define IR_NUM 8
+    
+    #define IR_KEY 0x2
+    #define IR_SHORT 0
+    #define IR_LONG 1
+    
+    #define IR_NOTE_NONE    0x0
+    #define IR_NOTE_FAR     0x1
+    #define IR_NOTE_CLOSE   0x2
+    #define IR_NOTE_CLOSER  0x3
+    
+    #define DIS_FAR 500
+    #define DIS_CLOSE 1000
+    #define DIS_MORE_CLOSE 1500
+    
+    #define DIS_0 0x0//low_value
+    #define DIS_1 0x1
+    #define DIS_2 0x2
+    #define DIS_3 0x3
+    #define DIS_4 0x4
+    #define DIS_5 0x5
+    #define DIS_6 0x6
+    #define DIS_7 0x7//high_value
+    
+    #define DIF_0 0x0//low_value
+    #define DIF_1 0x1
+    #define DIF_2 0x2
+    #define DIF_3 0x3
+    #define DIF_4 0x4
+    #define DIF_5 0x5
+    #define DIF_6 0x6
+    #define DIF_7 0x7//high_value
+    
+    #define LONG_AVE 5
+    
+    #define START_BIT   0x04
+    #define MODE_SINGLE 0x02    // Single-ended mode
+    #define MODE_DIFF   0x00    // Differential mode
+#endif /*IR_SENSOR*/
+
+#endif
\ No newline at end of file