Main Program

Dependencies:   mbed AQM1602 HMC6352 PID

Committer:
lilac0112_1
Date:
Sat Jan 09 02:15:46 2016 +0000
Revision:
15:88f2c525caca
Parent:
14:6f214ea5722e
Child:
16:6900f47fa0b5
plan to delete rotarysw

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lilac0112_1 1:f2633c150301 1 #ifndef _DEF_H_
lilac0112_1 1:f2633c150301 2 #define _DEF_H_
lilac0112_1 1:f2633c150301 3
lilac0112_1 1:f2633c150301 4 //BT(BlueTooth)
lilac0112_1 1:f2633c150301 5 #define DATA_NUM 8+2//2byte→KEYCODE(拝啓)とCHECKCODE(敬具) 8byte→やりとりするデータ
lilac0112_1 1:f2633c150301 6 #define TX_KEYCODE 0xAA//あちらのKEYCODE
lilac0112_1 1:f2633c150301 7 #define RX_KEYCODE 0xAA//こちらのKEYCODE
lilac0112_1 1:f2633c150301 8 #define KEY 0//KEYCODEは配列の最初
lilac0112_1 1:f2633c150301 9 #define CHECK DATA_NUM-1//CHECKCODEは配列の最後
lilac0112_1 1:f2633c150301 10
lilac0112_1 4:69fd47e1d296 11
lilac0112_1 10:3d0714c1ac75 12 //Switch 入力値
lilac0112_1 10:3d0714c1ac75 13 #define NONE 0x00
lilac0112_1 10:3d0714c1ac75 14 #define FRONT 0x01
lilac0112_1 10:3d0714c1ac75 15 #define BACK 0x02
lilac0112_1 15:88f2c525caca 16 #define RIGHT 0x04
lilac0112_1 15:88f2c525caca 17 #define LEFT 0x08
lilac0112_1 15:88f2c525caca 18
lilac0112_1 15:88f2c525caca 19 #define F_L 0x09
lilac0112_1 15:88f2c525caca 20 #define B_R 0x06
lilac0112_1 15:88f2c525caca 21
lilac0112_1 10:3d0714c1ac75 22 //Lcd 設定値
lilac0112_1 4:69fd47e1d296 23 #define BUFSIZE 10
lilac0112_1 6:4e83c236ee57 24 #define STATE_NUM_X 0x04
lilac0112_1 6:4e83c236ee57 25 #define STATE_NUM_Y 0x10
lilac0112_1 10:3d0714c1ac75 26 //繰り返し割り込み
lilac0112_1 10:3d0714c1ac75 27 #define DUTY_NUM 1
lilac0112_1 6:4e83c236ee57 28
lilac0112_1 10:3d0714c1ac75 29 #define DUTY_SW 0
lilac0112_1 10:3d0714c1ac75 30 #define DUTY_GYRO 1
lilac0112_1 10:3d0714c1ac75 31 #define DUTY_PING 2
lilac0112_1 10:3d0714c1ac75 32 #define DUTY_COLOR 3
lilac0112_1 10:3d0714c1ac75 33 #define DUTY_MOUSE 4
lilac0112_1 1:f2633c150301 34
lilac0112_1 13:f8f5bd2f0525 35 //MPU6050関連
lilac0112_1 13:f8f5bd2f0525 36 //config.h
lilac0112_1 13:f8f5bd2f0525 37
lilac0112_1 13:f8f5bd2f0525 38 //データ
lilac0112_1 1:f2633c150301 39 typedef struct {
lilac0112_1 1:f2633c150301 40 uint8_t ping[4];
lilac0112_1 1:f2633c150301 41 uint8_t ir[12];
lilac0112_1 1:f2633c150301 42 uint8_t irLong[6];
lilac0112_1 1:f2633c150301 43 uint8_t line[3];
lilac0112_1 1:f2633c150301 44 uint8_t mouse[2];
lilac0112_1 1:f2633c150301 45 uint16_t compass;
lilac0112_1 1:f2633c150301 46 uint8_t color[3];
lilac0112_1 5:de0f26f533d8 47 uint8_t lcdpoint[2];
lilac0112_1 10:3d0714c1ac75 48 uint8_t stopflag;
lilac0112_1 1:f2633c150301 49 } Record;
lilac0112_1 1:f2633c150301 50
lilac0112_1 1:f2633c150301 51 #endif