Main Program
Dependencies: mbed AQM1602 HMC6352 PID
Diff: setting/main.h
- Revision:
- 14:6f214ea5722e
- Child:
- 15:88f2c525caca
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/setting/main.h Thu Jan 07 09:50:30 2016 +0000 @@ -0,0 +1,56 @@ +#ifndef _MAIN_H_ +#define _MAIN_H_ + +#include "def.h" + +volatile uint8_t INdata[DATA_NUM]={0}, EXdata[DATA_NUM]={0}; +Record data; +BusOut LED(LED1); +RawSerial pc(SERIAL_TX, SERIAL_RX); +RawSerial RN42(D8, D2); +AQM1602 Lcd(NC, NC); +Timer t; +Ticker Duty[DUTY_NUM]; +Timeout Stp; + +MPU6050 mpu(D14, D15); // sda, scl pin +InterruptIn INT0(D7); // INT0 pin + +BusIn RotarySw(NC, NC, NC, NC); +BusIn Sw(NC, NC); + +//Serail for motors +string StringFIN; + +//mouse +static PinName const MOSI = D11; +static PinName const MISO = D12; +static PinName const SCLK = D13; +static PinName const NCS = D10; +adns_9800 mouse_sensor(MOSI, MISO, SCLK, NCS); + + +//Lcd出力文字(6文字に揃える.) +char lcdstr[0x10][0x04][BUFSIZE]={ + {{"None "}, {0 }, {0 }, {0 }}, + {{"Start "}, {0 }, {0 }, {0 }}, + {{"Debug0"}, {"Ir0 "}, {"Ir1 "}, {"Ir2 "}}, + {{"Debug1"}, {"Ping0 "}, {"Mouse0"}, {"Gyro0 "}}, + {{"Debug2"}, {0 }, {0 }, {0 }}, + {{"Test0 "}, {0 }, {0 }, {0 }}, + {{"Test1 "}, {0 }, {0 }, {0 }}, + {{"Test2 "}, {0 }, {0 }, {0 }}, + {{"Calib0"}, {0 }, {0 }, {0 }}, + {{"Calib1"}, {0 }, {0 }, {0 }}, + {{"Calib2"}, {0 }, {0 }, {0 }}, + {{"Save "}, {0 }, {0 }, {0 }}, + {{"Store "}, {0 }, {0 }, {0 }}, + {{"Def0 "}, {0 }, {0 }, {0 }}, + {{"Att0 "}, {0 }, {0 }, {0 }}, + {{"Stop "}, {0 }, {0 }, {0 }} +}; +double dutycycle[DUTY_NUM] ={//[s] + 0.2 +}; + +#endif /*_MAIN_H_*/ \ No newline at end of file