Sherry Yang
/
LSM6DS3_Demo
Demo for LSM6DS3
Fork of LSM9DS1_Demo by
Revision 3:c450734baa8b, committed 2016-06-20
- Comitter:
- 5hel2l2y
- Date:
- Mon Jun 20 19:16:14 2016 +0000
- Parent:
- 2:78df20bf0af3
- Commit message:
- Demo will now be able to test different power modes.
Changed in this revision
LSM6DS3.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 78df20bf0af3 -r c450734baa8b LSM6DS3.lib --- a/LSM6DS3.lib Thu Jun 16 20:32:55 2016 +0000 +++ b/LSM6DS3.lib Mon Jun 20 19:16:14 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/5hel2l2y/code/LSM6DS3/#46630122dec9 +https://developer.mbed.org/users/5hel2l2y/code/LSM6DS3/#924c7dea286e
diff -r 78df20bf0af3 -r c450734baa8b main.cpp --- a/main.cpp Thu Jun 16 20:32:55 2016 +0000 +++ b/main.cpp Mon Jun 20 19:16:14 2016 +0000 @@ -16,7 +16,15 @@ { // Use the begin() function to initialize the LSM9DS0 library. // You can either call it with no parameters (the easy way): - uint16_t status = imu.begin(); + // SLEEP + //uint16_t status = imu.begin(imu.G_SCALE_245DPS, imu.A_SCALE_2G, +// imu.G_POWER_DOWN, imu.A_POWER_DOWN); + // LOWEST + //uint16_t status = imu.begin(imu.G_SCALE_245DPS, imu.A_SCALE_2G, +// imu.G_ODR_13_BW_0, imu.A_ODR_13); + // HIGHEST + uint16_t status = imu.begin(imu.G_SCALE_2000DPS, imu.A_SCALE_8G, + imu.G_ODR_1660, imu.A_ODR_6660); //Make sure communication is working pc.printf("LSM6DS3 WHO_AM_I's returned: 0x%X\r\n", status);