OS更新しない状態ならCLIできるかなと思った
Dependencies: PID R1370 mechanism ikarashiMDC_2byte_ver states omni_wheel PS3
pin_config.h
00001 #ifndef PIN_CONFIG_H 00002 #define PIN_CONFIG_H 00003 00004 #include "mbed.h" 00005 00006 //#define PI 3.1415926535 00007 00008 /*MDC*/ 00009 #define MDTX PC_6 00010 #define MDRX PC_7 00011 #define MDBAUD 115200 00012 #define MDcontrol D15 00013 00014 /*コントローラ*/ 00015 #define padTX PC_12 00016 #define padRX PD_2 00017 00018 /*R1370*/ 00019 #define GYROTX PB_6 00020 #define GYRORX PA_10 00021 00022 /*非常停止*/ 00023 #define STOP PA_7 00024 00025 /*PID*/ 00026 const float KP = 10; //速さ 00027 const float KI = 5.0; //揺れすぎたら大きく、動かな過ぎたら小さく 00028 const float KD = 0.0000005; //ずらしたときに戻る力 がでかすぎたら小さく、小さすぎたら大きく 00029 const float minLimit = -1; //逆回転速度の最大値 00030 const float maxLimit = 1; //回転速度の最大値 00031 00032 /*QEI 装填*/ 00033 #define encoder1 PC_8 00034 #define encoder2 PC_5 00035 00036 const int PPR = 100; 00037 const int spinLimit = 500; 00038 00039 /*昇降*/ 00040 const float riseSpeed = 0.2; 00041 const float follSpeed = -0.2; 00042 00043 /*機構回転速度*/ 00044 const float collectSpeed = 0.5; 00045 const float hookSpeed = 0.2; 00046 const float loadSpeed = 0.2; 00047 const float liftSpeed = 0.5; 00048 00049 /*PC出力*/ 00050 #define PCTX USBTX 00051 #define PCRX USBRX 00052 #define BTTX PC_10 00053 #define BTRX PC_11 00054 const int PCBAUD = 115200; 00055 const float WAITTIME = 0.05; 00056 00057 /*Arduino出力*/ 00058 #define LEDTX PA_0 00059 #define LEDRX PA_1 00060 const int LEDBAUD = 9600; 00061 const int HEADER = 0xff; 00062 00063 #endif
Generated on Sat Aug 13 2022 12:04:13 by 1.7.2