![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Change LSM6DS3 power mode using nRF51-DK BLE.
Dependencies: BLE_API LSM6DS3 mbed nRF51822 nrf51_rtc
Diff: main.cpp
- Revision:
- 4:46dd8065e05b
- Parent:
- 3:a43f11f5378f
- Child:
- 5:e2ba3c39e3b3
--- a/main.cpp Wed Jun 22 22:32:58 2016 +0000 +++ b/main.cpp Fri Jul 08 21:26:38 2016 +0000 @@ -66,12 +66,17 @@ imu.G_POWER_DOWN, imu.A_POWER_DOWN); break; case 50: - DEBUG("Low power\n\r"); + DEBUG("Accelerometer Low, Gyro Off\n\r"); status = imu.begin(imu.G_SCALE_245DPS, imu.A_SCALE_2G, - imu.G_ODR_13_BW_0, imu.A_ODR_13); + imu.G_POWER_DOWN, imu.A_ODR_13); break; case 51: - DEBUG("High power\n\r"); + DEBUG("Accelerometer High, Gyro Off\n\r"); + status = imu.begin(imu.G_SCALE_245DPS, imu.A_SCALE_8G, + imu.G_POWER_DOWN, imu.A_ODR_6660); + break; + case 52: + DEBUG("Accelerometer High, Gyro High\n\r"); status = imu.begin(imu.G_SCALE_2000DPS, imu.A_SCALE_8G, imu.G_ODR_1660, imu.A_ODR_6660); break;