2018年度用翼端mbedプログラム
Dependencies: Control_Yokutan_CANver1 XBusServo mbed mbed-rtos
Fork of ControlYokutan2017_2 by
Diff: main.cpp
- Branch:
- mpu????????
- Revision:
- 72:aef1ec8c66c7
- Parent:
- 71:a00561d455d1
- Child:
- 73:05feda5b0f98
--- a/main.cpp Sat Oct 21 06:52:10 2017 +0000 +++ b/main.cpp Fri Oct 27 09:51:52 2017 +0000 @@ -29,7 +29,7 @@ #define debug pc.printf -#define debugMPU //pc.printf +#define debugMPU pc.printf const char *configfilename = "/local/CONFIG.csv"; @@ -64,9 +64,6 @@ LocalFileSystem local("local"); -//Set up I2C, (SDA,SCL) -I2C i2c_mpu(p9,p10); - char toSendDatas[TO_SEND_DATAS_NUM]; char floatValues[10]; float eruronTrim; @@ -110,7 +107,7 @@ void MpuInit() { - i2c_mpu.frequency(400000); // use fast (400 kHz) I2C + i2c.frequency(400000); // use fast (400 kHz) I2C t.start(); uint8_t whoami = mpu6050.readByte(MPU6050_ADDRESS, WHO_AM_I_MPU6050); // Read WHO_AM_I register for MPU-6050 if (whoami == 0x68) { // WHO_AM_I should always be 0x68 @@ -290,7 +287,7 @@ } // toSendDatas[TO_SEND_DATAS_NUM - 1] = (char)(V/100); toSendDatas[TO_SEND_DATAS_NUM - 1] = (char)V; - pc.printf("test\n\r"); + pc.printf("servoV:%f\n\r",V); } void receiveDatas()