ジャパンオープン用のLPC824専用プログラム

Dependencies:   mbed-src Ping SDFileSystem

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers def.h Source File

def.h

00001 #ifndef _DEF_H_
00002 #define _DEF_H_
00003 
00004 //3つの内どれか一つを定義する.
00005 //#define ULTRA_SONIC//HC-SR04
00006 //#define ULTRA_SONIC_2//HC-SR04_on_DebugBoard
00007 #define IR_SENSOR//MCP3208
00008 
00009 #if defined(ULTRA_SONIC) || defined(ULTRA_SONIC_2)
00010 
00011 #endif /*(ULTRA_SONIC) || (ULTRA_SONIC_2)*/
00012 
00013 #ifdef IR_SENSOR
00014     
00015     #define IC_NUM 3
00016     #define IR_NUM 8
00017     
00018     #define IR_KEY 0x2
00019     #define IR_SHORT 0
00020     #define IR_LONG 1
00021     
00022     #define IR_NOTE_NONE    0x0
00023     #define IR_NOTE_FAR     0x1
00024     #define IR_NOTE_CLOSE   0x2
00025     #define IR_NOTE_CLOSER  0x3
00026     
00027     #define DIS_FAR 500
00028     #define DIS_CLOSE 1000
00029     #define DIS_MORE_CLOSE 1500
00030     
00031     #define DIS_0 0x0//low_value
00032     #define DIS_1 0x1
00033     #define DIS_2 0x2
00034     #define DIS_3 0x3
00035     #define DIS_4 0x4
00036     #define DIS_5 0x5
00037     #define DIS_6 0x6
00038     #define DIS_7 0x7//high_value
00039     
00040     #define DIF_0 0x0//low_value
00041     #define DIF_1 0x1
00042     #define DIF_2 0x2
00043     #define DIF_3 0x3
00044     #define DIF_4 0x4
00045     #define DIF_5 0x5
00046     #define DIF_6 0x6
00047     #define DIF_7 0x7//high_value
00048     
00049     #define LONG_AVE 5
00050     
00051     #define START_BIT   0x04
00052     #define MODE_SINGLE 0x02    // Single-ended mode
00053     #define MODE_DIFF   0x00    // Differential mode
00054 #endif /*IR_SENSOR*/
00055 
00056 #endif