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 p26, 00013 p30, 00014 p11, 00015 p12, 00016 p20, 00017 p19, 00018 p18, 00019 p17, 00020 p29, 00021 p15, 00022 p16 00023 /* 00024 p15, 00025 p17, 00026 p18, 00027 p19, 00028 p20, 00029 p12, 00030 p11, 00031 p30, 00032 p16, 00033 p29, 00034 p26 00035 */ 00036 }; 00037 00038 int Convert_Direction[DIRECTION] = { 00039 90, 00040 67, 00041 30, 00042 22, 00043 0, 00044 337, 00045 315, 00046 292, 00047 270, 00048 247, 00049 225, 00050 202, 00051 180, 00052 157, 00053 150, 00054 112 00055 }; 00056 00057 //ball direction 00058 double ball_sankaku[16][2] = { 00059 {0 , 1 }, 00060 {0.390 , 0.920}, 00061 {0.866 , 0.500}, 00062 {0.927 , 0.374}, 00063 {1 , 0 }, 00064 {0.920 ,-0.390}, 00065 {0.707 ,-0.707}, 00066 {0.374 ,-0.927}, 00067 {0 ,-1 }, 00068 {-0.390,-0.920}, 00069 {-0.707,-0.707}, 00070 {-0.927,-0.374}, 00071 {-1 , 0 }, 00072 {-0.920, 0.390}, 00073 {-0.866, 0.500}, 00074 {-0.374, 0.927} 00075 }; 00076 00077 double turn_sankaku[16][2] = { 00078 { 0 ,0 }, 00079 { 1 ,0 },//{ 0.920,-0.390 }, 00080 { 0.707,-0.707 }, //{ 0.500,-0.866 }, 00081 { 0.374,-0.927 }, 00082 { 0 ,-0.5 }, 00083 {-0.390,-0.920 }, 00084 {-0.707,-0.707 }, 00085 {-0.927,-0.374 }, 00086 {-0.927,-0.374 }, 00087 {0.920 ,-0.390 }, 00088 {0.707 ,-0.707 }, 00089 {0.374 ,-0.927 }, 00090 {0 ,-0.5 }, 00091 {-0.390,-0.920 }, 00092 {-0.707,-0.707 }, //{-0.500,-0.866 }, 00093 {-1 ,0 }//{-0.927,-0.374 } 00094 }; 00095 00096 00097 /* 00098 double turn_sankaku[16][2] = { 00099 {0 ,0 }, 00100 {0 ,0 }, 00101 {1 ,0 }, 00102 {0 ,-1}, 00103 {0 ,-1}, 00104 {0 ,-1}, 00105 {-1,0 }, 00106 {-1,0 }, 00107 {-1,0 }, 00108 {1 ,0 }, 00109 {1 ,0 }, 00110 {0 ,-1}, 00111 {0 ,-1}, 00112 {0 ,-1}, 00113 {-1,0 }, 00114 {0 ,0 } 00115 }; 00116 */
Generated on Wed Jul 20 2022 05:51:04 by
1.7.2