![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
MPU6050センサ Wallbot_BLE用 サンプル
Dependencies: BLE_API mbed nRF51822
Diff: main.cpp
- Revision:
- 8:35390100e16f
- Parent:
- 7:e18346358299
- Child:
- 9:aca7ff8a1945
--- a/main.cpp Tue Feb 03 17:16:08 2015 +0000 +++ b/main.cpp Sat Feb 07 05:58:51 2015 +0000 @@ -237,7 +237,20 @@ //#if DBG // pc.printf("Start\n\r"); //#endif + /* + #define MPU6050_ACCELERO_RANGE_2G 0 + #define MPU6050_ACCELERO_RANGE_4G 1 + #define MPU6050_ACCELERO_RANGE_8G 2 + #define MPU6050_ACCELERO_RANGE_16G 3 + + #define MPU6050_GYRO_RANGE_250 0 + #define MPU6050_GYRO_RANGE_500 1 + #define MPU6050_GYRO_RANGE_1000 2 + #define MPU6050_GYRO_RANGE_2000 3 + */ mpu.initialize(); + mpu.setAcceleroRange(2); // + mpu.setGyroRange(2); if( mpu.testConnection() ){ //pc.printf("mpu test:OK\n\r");