test

Dependencies:   HMC6352 PID mbed

Fork of ver1_2_2 by ryo seki

Committer:
akudohune
Date:
Sun Mar 10 07:31:31 2013 +0000
Revision:
1:89408fff7cc9
Parent:
0:74bf4953c0d1
new_cup;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
akudohune 0:74bf4953c0d1 1
akudohune 0:74bf4953c0d1 2
akudohune 0:74bf4953c0d1 3 #define IR_TIME_NOTFOUND 833 /* 見つけられなかったと判断するまでの時間(単位:us) */
akudohune 0:74bf4953c0d1 4 #define IR_COUNTMAX 487 /*最大パルス幅 パルスの存在しうる最大時間は487us*/
akudohune 0:74bf4953c0d1 5 #define ALL_IR 9
akudohune 0:74bf4953c0d1 6 #define DIREC_IR 8
akudohune 0:74bf4953c0d1 7 #define DIRECTION 16
akudohune 0:74bf4953c0d1 8 #define TERM 0
akudohune 0:74bf4953c0d1 9 #define DELTA -2
akudohune 0:74bf4953c0d1 10 #define SWAP(type,a,b) { type temp = a; a = b; b = temp; }
akudohune 0:74bf4953c0d1 11
akudohune 0:74bf4953c0d1 12
akudohune 0:74bf4953c0d1 13 /* 赤外線センサに使うpinを配列に格納 */
akudohune 0:74bf4953c0d1 14 PinName ir_num[ALL_IR] = {
akudohune 0:74bf4953c0d1 15 p13,
akudohune 0:74bf4953c0d1 16 p14,
akudohune 0:74bf4953c0d1 17 p15,
akudohune 0:74bf4953c0d1 18 p16,
akudohune 0:74bf4953c0d1 19 p17,
akudohune 0:74bf4953c0d1 20 p18,
akudohune 0:74bf4953c0d1 21 p19,
akudohune 0:74bf4953c0d1 22 p20,
akudohune 0:74bf4953c0d1 23 p30
akudohune 0:74bf4953c0d1 24 };
akudohune 0:74bf4953c0d1 25
akudohune 0:74bf4953c0d1 26 int Convert_Direction[DIRECTION] = {
akudohune 0:74bf4953c0d1 27 90,
akudohune 0:74bf4953c0d1 28 67,
akudohune 0:74bf4953c0d1 29 45,
akudohune 0:74bf4953c0d1 30 22,
akudohune 0:74bf4953c0d1 31 0,
akudohune 0:74bf4953c0d1 32 337,
akudohune 0:74bf4953c0d1 33 315,
akudohune 0:74bf4953c0d1 34 292,
akudohune 0:74bf4953c0d1 35 270,
akudohune 0:74bf4953c0d1 36 247,
akudohune 0:74bf4953c0d1 37 225,
akudohune 0:74bf4953c0d1 38 202,
akudohune 0:74bf4953c0d1 39 180,
akudohune 0:74bf4953c0d1 40 157,
akudohune 0:74bf4953c0d1 41 135,
akudohune 0:74bf4953c0d1 42 112
akudohune 0:74bf4953c0d1 43 };
akudohune 0:74bf4953c0d1 44
akudohune 0:74bf4953c0d1 45 //ball direction
akudohune 0:74bf4953c0d1 46 double ball_sankaku[16][2] = {
akudohune 0:74bf4953c0d1 47 {0 , 1 },
akudohune 0:74bf4953c0d1 48 {0.390 , 0.920},
akudohune 0:74bf4953c0d1 49 {0.707 , 0.707},
akudohune 0:74bf4953c0d1 50 {0.927 , 0.374},
akudohune 0:74bf4953c0d1 51 {1 , 0 },
akudohune 0:74bf4953c0d1 52 {0.920 ,-0.390},
akudohune 0:74bf4953c0d1 53 {0.707 ,-0.707},
akudohune 0:74bf4953c0d1 54 {0.374 ,-0.927},
akudohune 0:74bf4953c0d1 55 {0 ,-1 },
akudohune 0:74bf4953c0d1 56 {-0.390,-0.920},
akudohune 0:74bf4953c0d1 57 {-0.707,-0.707},
akudohune 0:74bf4953c0d1 58 {-0.927,-0.374},
akudohune 0:74bf4953c0d1 59 {-1 , 0 },
akudohune 0:74bf4953c0d1 60 {-0.920, 0.390},
akudohune 0:74bf4953c0d1 61 {-0.707, 0.707},
akudohune 0:74bf4953c0d1 62 {-0.374, 0.927}
akudohune 0:74bf4953c0d1 63 };