青木制作機体プログラム

Dependencies:   mbed AQM0802 CRotaryEncoder TB6612FNG

machine.h

Committer:
yusaku0125
Date:
2019-11-27
Revision:
32:4deb27262901
Parent:
31:fe9ae7992246

File content as of revision 32:4deb27262901:

/*******************************************
機体の状態を示すフラグ定義。
基本的に変更する必要はない。
*******************************************/
//スイッチ状態の定義
#define     PUSH                   0    //スイッチ押したときの状態
#define     PULL                   1    //スイッチ離したときの状態
//機体状態の定義
#define     STOP                0x80    //機体停止状態
#define     RUN_START           0x40    //スタートマーカ通過
#define     RUN_COURSE_LOUT     0x20    //左コースアウト状態
#define     RUN_COURSE_CENTER   0x18    //ライン中央走行状態
#define     RUN_COURSE_ROUT     0x04    //右コースアウト状態
#define     SECOND_RUN          0x02    //機体停止状態
#define     TUARD_RUN           0x01    //機体設定モード

#define     PULSE_TO_UM               28     //エンコーダ1パルス当たりのタイヤ移動距離[um]
#define     INTERRUPT_TIME          1000     //割りこみ周期[us]