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.
IR.h
00001 #define IR_TIME_NOTFOUND 833 /* 見つけられなかったと判断するまでの時間(単位:us) */ 00002 #define IR_COUNTMAX 487 /*最大パルス幅 パルスの存在しうる最大時間は487us*/ 00003 #define ALL_IR 11 00004 #define DIREC_IR 10 00005 #define DIRECTION 16 00006 #define TERM 0 00007 #define DELTA -2 00008 #define SWAP(type,a,b) { type temp = a; a = b; b = temp; } 00009 00010 /* 赤外線センサに使うpinを配列に格納 */ 00011 PinName ir_num[ALL_IR] = { 00012 p15, 00013 p17, 00014 p18, 00015 p19, 00016 p20, 00017 p12, 00018 p11, 00019 p30, 00020 p16, 00021 p29, 00022 p26 00023 }; 00024 00025 int Convert_Direction[DIRECTION] = { 00026 90, 00027 67, 00028 30, 00029 22, 00030 0, 00031 337, 00032 315, 00033 292, 00034 270, 00035 247, 00036 225, 00037 202, 00038 180, 00039 157, 00040 150, 00041 112 00042 }; 00043 00044 //ball direction 00045 double ball_sankaku[16][2] = { 00046 {0 , 1 }, 00047 {0.390 , 0.920}, 00048 {0.866 , 0.500}, 00049 {0.927 , 0.374}, 00050 {1 , 0 }, 00051 {0.920 ,-0.390}, 00052 {0.707 ,-0.707}, 00053 {0.374 ,-0.927}, 00054 {0 ,-1 }, 00055 {-0.390,-0.920}, 00056 {-0.707,-0.707}, 00057 {-0.927,-0.374}, 00058 {-1 , 0 }, 00059 {-0.920, 0.390}, 00060 {-0.866, 0.500}, 00061 {-0.374, 0.927} 00062 }; 00063 00064 double turn_sankaku[16][2] = { 00065 { 0 ,0 }, 00066 { 1 ,0 },//{ 0.920,-0.390 }, 00067 { 0.707,-0.707 }, //{ 0.500,-0.866 }, 00068 { 0.374,-0.927 }, 00069 { 0 ,-0.5 }, 00070 {-0.390,-0.920 }, 00071 {-0.707,-0.707 }, 00072 {-0.927,-0.374 }, 00073 {-0.927,-0.374 }, 00074 {0.920 ,-0.390 }, 00075 {0.707 ,-0.707 }, 00076 {0.374 ,-0.927 }, 00077 {0 ,-0.5 }, 00078 {-0.390,-0.920 }, 00079 {-0.707,-0.707 }, //{-0.500,-0.866 }, 00080 {-1 ,0 }//{-0.927,-0.374 } 00081 }; 00082 00083 00084 /* 00085 double turn_sankaku[16][2] = { 00086 {0 ,0 }, 00087 {0 ,0 }, 00088 {1 ,0 }, 00089 {0 ,-1}, 00090 {0 ,-1}, 00091 {0 ,-1}, 00092 {-1,0 }, 00093 {-1,0 }, 00094 {-1,0 }, 00095 {1 ,0 }, 00096 {1 ,0 }, 00097 {0 ,-1}, 00098 {0 ,-1}, 00099 {0 ,-1}, 00100 {-1,0 }, 00101 {0 ,0 } 00102 }; 00103 */
Generated on Tue Jul 12 2022 12:46:47 by
1.7.2