Fork of Eugene Gonzalez's version of LSM9DS1_Demo, Modified by Sherry Yang.

Fork of LSM6DS3 by Sherry Yang

Committer:
5hel2l2y
Date:
Thu Jun 16 20:07:13 2016 +0000
Revision:
0:46630122dec9
Child:
1:924c7dea286e
modified to work LSM6DS3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
5hel2l2y 0:46630122dec9 1 // Based on Eugene Gonzalez's version of LSM9DS1_Demo
5hel2l2y 0:46630122dec9 2 // Modified by Sherry Yang for LSM6DS3 sensor
5hel2l2y 0:46630122dec9 3 #ifndef _LSM6DS3_H__
5hel2l2y 0:46630122dec9 4 #define _LSM6DS3_H__
5hel2l2y 0:46630122dec9 5
5hel2l2y 0:46630122dec9 6 #include "mbed.h"
5hel2l2y 0:46630122dec9 7
5hel2l2y 0:46630122dec9 8 /////////////////////////////////////////
5hel2l2y 0:46630122dec9 9 // LSM6DS3 Accel/Gyro (XL/G) Registers //
5hel2l2y 0:46630122dec9 10 /////////////////////////////////////////
5hel2l2y 0:46630122dec9 11 #define RAM_ACCESS 0x01
5hel2l2y 0:46630122dec9 12 #define SENSOR_SYNC_TIME 0x04
5hel2l2y 0:46630122dec9 13 #define SENSOR_SYNC_EN 0x05
5hel2l2y 0:46630122dec9 14 #define FIFO_CTRL1 0x06
5hel2l2y 0:46630122dec9 15 #define FIFO_CTRL2 0x07
5hel2l2y 0:46630122dec9 16 #define FIFO_CTRL3 0x08
5hel2l2y 0:46630122dec9 17 #define FIFO_CTRL4 0x09
5hel2l2y 0:46630122dec9 18 #define FIFO_CTRL5 0x0A
5hel2l2y 0:46630122dec9 19 #define ORIENT_CFG_G 0x0B
5hel2l2y 0:46630122dec9 20 #define REFERENCE_G 0x0C
5hel2l2y 0:46630122dec9 21 #define INT1_CTRL 0x0D
5hel2l2y 0:46630122dec9 22 #define INT2_CTRL 0x0E
5hel2l2y 0:46630122dec9 23 #define WHO_AM_I_REG 0X0F
5hel2l2y 0:46630122dec9 24 #define CTRL1_XL 0x10
5hel2l2y 0:46630122dec9 25 #define CTRL2_G 0x11
5hel2l2y 0:46630122dec9 26 #define CTRL3_C 0x12
5hel2l2y 0:46630122dec9 27 #define CTRL4_C 0x13
5hel2l2y 0:46630122dec9 28 #define CTRL5_C 0x14
5hel2l2y 0:46630122dec9 29 #define CTRL6_G 0x15
5hel2l2y 0:46630122dec9 30 #define CTRL7_G 0x16
5hel2l2y 0:46630122dec9 31 #define CTRL8_XL 0x17
5hel2l2y 0:46630122dec9 32 #define CTRL9_XL 0x18
5hel2l2y 0:46630122dec9 33 #define CTRL10_C 0x19
5hel2l2y 0:46630122dec9 34 #define MASTER_CONFIG 0x1A
5hel2l2y 0:46630122dec9 35 #define WAKE_UP_SRC 0x1B
5hel2l2y 0:46630122dec9 36 #define TAP_SRC 0x1C
5hel2l2y 0:46630122dec9 37 #define D6D_SRC 0x1D
5hel2l2y 0:46630122dec9 38 #define STATUS_REG 0x1E
5hel2l2y 0:46630122dec9 39 #define OUT_TEMP_L 0x20
5hel2l2y 0:46630122dec9 40 #define OUT_TEMP_H 0x21
5hel2l2y 0:46630122dec9 41 #define OUTX_L_G 0x22
5hel2l2y 0:46630122dec9 42 #define OUTX_H_G 0x23
5hel2l2y 0:46630122dec9 43 #define OUTY_L_G 0x24
5hel2l2y 0:46630122dec9 44 #define OUTY_H_G 0x25
5hel2l2y 0:46630122dec9 45 #define OUTZ_L_G 0x26
5hel2l2y 0:46630122dec9 46 #define OUTZ_H_G 0x27
5hel2l2y 0:46630122dec9 47 #define OUTX_L_XL 0x28
5hel2l2y 0:46630122dec9 48 #define OUTX_H_XL 0x29
5hel2l2y 0:46630122dec9 49 #define OUTY_L_XL 0x2A
5hel2l2y 0:46630122dec9 50 #define OUTY_H_XL 0x2B
5hel2l2y 0:46630122dec9 51 #define OUTZ_L_XL 0x2C
5hel2l2y 0:46630122dec9 52 #define OUTZ_H_XL 0x2D
5hel2l2y 0:46630122dec9 53 #define SENSORHUB1_REG 0x2E
5hel2l2y 0:46630122dec9 54 #define SENSORHUB2_REG 0x2F
5hel2l2y 0:46630122dec9 55 #define SENSORHUB3_REG 0x30
5hel2l2y 0:46630122dec9 56 #define SENSORHUB4_REG 0x31
5hel2l2y 0:46630122dec9 57 #define SENSORHUB5_REG 0x32
5hel2l2y 0:46630122dec9 58 #define SENSORHUB6_REG 0x33
5hel2l2y 0:46630122dec9 59 #define SENSORHUB7_REG 0x34
5hel2l2y 0:46630122dec9 60 #define SENSORHUB8_REG 0x35
5hel2l2y 0:46630122dec9 61 #define SENSORHUB9_REG 0x36
5hel2l2y 0:46630122dec9 62 #define SENSORHUB10_REG 0x37
5hel2l2y 0:46630122dec9 63 #define SENSORHUB11_REG 0x38
5hel2l2y 0:46630122dec9 64 #define SENSORHUB12_REG 0x39
5hel2l2y 0:46630122dec9 65 #define FIFO_STATUS1 0x3A
5hel2l2y 0:46630122dec9 66 #define FIFO_STATUS2 0x3B
5hel2l2y 0:46630122dec9 67 #define FIFO_STATUS3 0x3C
5hel2l2y 0:46630122dec9 68 #define FIFO_STATUS4 0x3D
5hel2l2y 0:46630122dec9 69 #define FIFO_DATA_OUT_L 0x3E
5hel2l2y 0:46630122dec9 70 #define FIFO_DATA_OUT_H 0x3F
5hel2l2y 0:46630122dec9 71 #define TIMESTAMP0_REG 0x40
5hel2l2y 0:46630122dec9 72 #define TIMESTAMP1_REG 0x41
5hel2l2y 0:46630122dec9 73 #define TIMESTAMP2_REG 0x42
5hel2l2y 0:46630122dec9 74 #define STEP_COUNTER_L 0x4B
5hel2l2y 0:46630122dec9 75 #define STEP_COUNTER_H 0x4C
5hel2l2y 0:46630122dec9 76 #define FUNC_SR 0x53
5hel2l2y 0:46630122dec9 77 #define TAP_CFG 0x58
5hel2l2y 0:46630122dec9 78 #define TAP_THS_6D 0x59
5hel2l2y 0:46630122dec9 79 #define INT_DUR2 0x5A
5hel2l2y 0:46630122dec9 80 #define WAKE_UP_THS 0x5B
5hel2l2y 0:46630122dec9 81 #define WAKE_UP_DUR 0x5C
5hel2l2y 0:46630122dec9 82 #define FREE_FALL 0x5D
5hel2l2y 0:46630122dec9 83 #define MD1_CFG 0x5E
5hel2l2y 0:46630122dec9 84 #define MD2_CFG 0x5F
5hel2l2y 0:46630122dec9 85
5hel2l2y 0:46630122dec9 86 // Possible I2C addresses for the accel/gyro
5hel2l2y 0:46630122dec9 87 #define LSM6DS3_AG_I2C_ADDR(sa0) ((sa0) ? 0xD6 : 0xD4)
5hel2l2y 0:46630122dec9 88
5hel2l2y 0:46630122dec9 89 /**
5hel2l2y 0:46630122dec9 90 * LSM6DS3 Class - driver for the 9 DoF IMU
5hel2l2y 0:46630122dec9 91 */
5hel2l2y 0:46630122dec9 92 class LSM6DS3
5hel2l2y 0:46630122dec9 93 {
5hel2l2y 0:46630122dec9 94 public:
5hel2l2y 0:46630122dec9 95
5hel2l2y 0:46630122dec9 96 /// gyro_scale defines the possible full-scale ranges of the gyroscope:
5hel2l2y 0:46630122dec9 97 enum gyro_scale
5hel2l2y 0:46630122dec9 98 {
5hel2l2y 0:46630122dec9 99 G_SCALE_245DPS = 0x0 << 3, // 00 << 3: +/- 245 degrees per second
5hel2l2y 0:46630122dec9 100 G_SCALE_500DPS = 0x1 << 3, // 01 << 3: +/- 500 dps
5hel2l2y 0:46630122dec9 101 G_SCALE_2000DPS = 0x3 << 3 // 11 << 3: +/- 2000 dps
5hel2l2y 0:46630122dec9 102 };
5hel2l2y 0:46630122dec9 103
5hel2l2y 0:46630122dec9 104 /// gyro_odr defines all possible data rate/bandwidth combos of the gyro:
5hel2l2y 0:46630122dec9 105 enum gyro_odr
5hel2l2y 0:46630122dec9 106 { // ODR (Hz) --- Cutoff
5hel2l2y 0:46630122dec9 107 G_POWER_DOWN = 0x00, // 0 0
5hel2l2y 0:46630122dec9 108 G_ODR_15_BW_0 = 0x20, // 14.9 0
5hel2l2y 0:46630122dec9 109 G_ODR_60_BW_16 = 0x40, // 59.5 16
5hel2l2y 0:46630122dec9 110 G_ODR_119_BW_14 = 0x60, // 119 14
5hel2l2y 0:46630122dec9 111 G_ODR_119_BW_31 = 0x61, // 119 31
5hel2l2y 0:46630122dec9 112 G_ODR_238_BW_14 = 0x80, // 238 14
5hel2l2y 0:46630122dec9 113 G_ODR_238_BW_29 = 0x81, // 238 29
5hel2l2y 0:46630122dec9 114 G_ODR_238_BW_63 = 0x82, // 238 63
5hel2l2y 0:46630122dec9 115 G_ODR_238_BW_78 = 0x83, // 238 78
5hel2l2y 0:46630122dec9 116 G_ODR_476_BW_21 = 0xA0, // 476 21
5hel2l2y 0:46630122dec9 117 G_ODR_476_BW_28 = 0xA1, // 476 28
5hel2l2y 0:46630122dec9 118 G_ODR_476_BW_57 = 0xA2, // 476 57
5hel2l2y 0:46630122dec9 119 G_ODR_476_BW_100 = 0xA3, // 476 100
5hel2l2y 0:46630122dec9 120 G_ODR_952_BW_33 = 0xC0, // 952 33
5hel2l2y 0:46630122dec9 121 G_ODR_952_BW_40 = 0xC1, // 952 40
5hel2l2y 0:46630122dec9 122 G_ODR_952_BW_58 = 0xC2, // 952 58
5hel2l2y 0:46630122dec9 123 G_ODR_952_BW_100 = 0xC3 // 952 100
5hel2l2y 0:46630122dec9 124 };
5hel2l2y 0:46630122dec9 125
5hel2l2y 0:46630122dec9 126 /// accel_scale defines all possible FSR's of the accelerometer:
5hel2l2y 0:46630122dec9 127 enum accel_scale
5hel2l2y 0:46630122dec9 128 {
5hel2l2y 0:46630122dec9 129 A_SCALE_2G, // 00: +/- 2g
5hel2l2y 0:46630122dec9 130 A_SCALE_16G,// 01: +/- 16g
5hel2l2y 0:46630122dec9 131 A_SCALE_4G, // 10: +/- 4g
5hel2l2y 0:46630122dec9 132 A_SCALE_8G // 11: +/- 8g
5hel2l2y 0:46630122dec9 133 };
5hel2l2y 0:46630122dec9 134
5hel2l2y 0:46630122dec9 135 /// accel_oder defines all possible output data rates of the accelerometer:
5hel2l2y 0:46630122dec9 136 enum accel_odr
5hel2l2y 0:46630122dec9 137 {
5hel2l2y 0:46630122dec9 138 A_POWER_DOWN, // Power-down mode (0x0)
5hel2l2y 0:46630122dec9 139 A_ODR_10, // 10 Hz (0x1)
5hel2l2y 0:46630122dec9 140 A_ODR_50, // 50 Hz (0x2)
5hel2l2y 0:46630122dec9 141 A_ODR_119, // 119 Hz (0x3)
5hel2l2y 0:46630122dec9 142 A_ODR_238, // 238 Hz (0x4)
5hel2l2y 0:46630122dec9 143 A_ODR_476, // 476 Hz (0x5)
5hel2l2y 0:46630122dec9 144 A_ODR_952 // 952 Hz (0x6)
5hel2l2y 0:46630122dec9 145 };
5hel2l2y 0:46630122dec9 146
5hel2l2y 0:46630122dec9 147 // accel_bw defines all possible bandwiths for low-pass filter of the accelerometer:
5hel2l2y 0:46630122dec9 148 enum accel_bw
5hel2l2y 0:46630122dec9 149 {
5hel2l2y 0:46630122dec9 150 A_BW_AUTO_SCALE = 0x0, // Automatic BW scaling (0x0)
5hel2l2y 0:46630122dec9 151 A_BW_408 = 0x4, // 408 Hz (0x4)
5hel2l2y 0:46630122dec9 152 A_BW_211 = 0x5, // 211 Hz (0x5)
5hel2l2y 0:46630122dec9 153 A_BW_105 = 0x6, // 105 Hz (0x6)
5hel2l2y 0:46630122dec9 154 A_BW_50 = 0x7 // 50 Hz (0x7)
5hel2l2y 0:46630122dec9 155 };
5hel2l2y 0:46630122dec9 156
5hel2l2y 0:46630122dec9 157 // We'll store the gyro, and accel, readings in a series of
5hel2l2y 0:46630122dec9 158 // public class variables. Each sensor gets three variables -- one for each
5hel2l2y 0:46630122dec9 159 // axis. Call readGyro(), and readAccel() first, before using
5hel2l2y 0:46630122dec9 160 // these variables!
5hel2l2y 0:46630122dec9 161 // These values are the RAW signed 16-bit readings from the sensors.
5hel2l2y 0:46630122dec9 162 int16_t gx_raw, gy_raw, gz_raw; // x, y, and z axis readings of the gyroscope
5hel2l2y 0:46630122dec9 163 int16_t ax_raw, ay_raw, az_raw; // x, y, and z axis readings of the accelerometer
5hel2l2y 0:46630122dec9 164 int16_t temperature_raw;
5hel2l2y 0:46630122dec9 165
5hel2l2y 0:46630122dec9 166 // floating-point values of scaled data in real-world units
5hel2l2y 0:46630122dec9 167 float gx, gy, gz;
5hel2l2y 0:46630122dec9 168 float ax, ay, az;
5hel2l2y 0:46630122dec9 169 float temperature_c, temperature_f; // temperature in celcius and fahrenheit
5hel2l2y 0:46630122dec9 170
5hel2l2y 0:46630122dec9 171
5hel2l2y 0:46630122dec9 172 /** LSM6DS3 -- LSM6DS3 class constructor
5hel2l2y 0:46630122dec9 173 * The constructor will set up a handful of private variables, and set the
5hel2l2y 0:46630122dec9 174 * communication mode as well.
5hel2l2y 0:46630122dec9 175 * Input:
5hel2l2y 0:46630122dec9 176 * - interface = Either MODE_SPI or MODE_I2C, whichever you're using
5hel2l2y 0:46630122dec9 177 * to talk to the IC.
5hel2l2y 0:46630122dec9 178 * - xgAddr = If MODE_I2C, this is the I2C address of the accel/gyro.
5hel2l2y 0:46630122dec9 179 * If MODE_SPI, this is the chip select pin of the accel/gyro (CS_A/G)
5hel2l2y 0:46630122dec9 180 */
5hel2l2y 0:46630122dec9 181 LSM6DS3(PinName sda, PinName scl, uint8_t xgAddr = LSM6DS3_AG_I2C_ADDR(1));
5hel2l2y 0:46630122dec9 182
5hel2l2y 0:46630122dec9 183 /** begin() -- Initialize the gyro, and accelerometer.
5hel2l2y 0:46630122dec9 184 * This will set up the scale and output rate of each sensor. It'll also
5hel2l2y 0:46630122dec9 185 * "turn on" every sensor and every axis of every sensor.
5hel2l2y 0:46630122dec9 186 * Input:
5hel2l2y 0:46630122dec9 187 * - gScl = The scale of the gyroscope. This should be a gyro_scale value.
5hel2l2y 0:46630122dec9 188 * - aScl = The scale of the accelerometer. Should be a accel_scale value.
5hel2l2y 0:46630122dec9 189 * - gODR = Output data rate of the gyroscope. gyro_odr value.
5hel2l2y 0:46630122dec9 190 * - aODR = Output data rate of the accelerometer. accel_odr value.
5hel2l2y 0:46630122dec9 191 * Output: The function will return an unsigned 16-bit value. The most-sig
5hel2l2y 0:46630122dec9 192 * bytes of the output are the WHO_AM_I reading of the accel/gyro.
5hel2l2y 0:46630122dec9 193 * All parameters have a defaulted value, so you can call just "begin()".
5hel2l2y 0:46630122dec9 194 * Default values are FSR's of: +/- 245DPS, 4g, 2Gs; ODRs of 119 Hz for
5hel2l2y 0:46630122dec9 195 * gyro, 119 Hz for accelerometer.
5hel2l2y 0:46630122dec9 196 * Use the return value of this function to verify communication.
5hel2l2y 0:46630122dec9 197 */
5hel2l2y 0:46630122dec9 198 uint16_t begin(gyro_scale gScl = G_SCALE_245DPS,
5hel2l2y 0:46630122dec9 199 accel_scale aScl = A_SCALE_2G, gyro_odr gODR = G_ODR_119_BW_14,
5hel2l2y 0:46630122dec9 200 accel_odr aODR = A_ODR_119);
5hel2l2y 0:46630122dec9 201
5hel2l2y 0:46630122dec9 202 /** readGyro() -- Read the gyroscope output registers.
5hel2l2y 0:46630122dec9 203 * This function will read all six gyroscope output registers.
5hel2l2y 0:46630122dec9 204 * The readings are stored in the class' gx_raw, gy_raw, and gz_raw variables. Read
5hel2l2y 0:46630122dec9 205 * those _after_ calling readGyro().
5hel2l2y 0:46630122dec9 206 */
5hel2l2y 0:46630122dec9 207 void readGyro();
5hel2l2y 0:46630122dec9 208
5hel2l2y 0:46630122dec9 209 /** readAccel() -- Read the accelerometer output registers.
5hel2l2y 0:46630122dec9 210 * This function will read all six accelerometer output registers.
5hel2l2y 0:46630122dec9 211 * The readings are stored in the class' ax_raw, ay_raw, and az_raw variables. Read
5hel2l2y 0:46630122dec9 212 * those _after_ calling readAccel().
5hel2l2y 0:46630122dec9 213 */
5hel2l2y 0:46630122dec9 214 void readAccel();
5hel2l2y 0:46630122dec9 215
5hel2l2y 0:46630122dec9 216 /** readTemp() -- Read the temperature output register.
5hel2l2y 0:46630122dec9 217 * This function will read two temperature output registers.
5hel2l2y 0:46630122dec9 218 * The combined readings are stored in the class' temperature variables. Read
5hel2l2y 0:46630122dec9 219 * those _after_ calling readTemp().
5hel2l2y 0:46630122dec9 220 */
5hel2l2y 0:46630122dec9 221 void readTemp();
5hel2l2y 0:46630122dec9 222
5hel2l2y 0:46630122dec9 223 /** setGyroScale() -- Set the full-scale range of the gyroscope.
5hel2l2y 0:46630122dec9 224 * This function can be called to set the scale of the gyroscope to
5hel2l2y 0:46630122dec9 225 * 245, 500, or 2000 degrees per second.
5hel2l2y 0:46630122dec9 226 * Input:
5hel2l2y 0:46630122dec9 227 * - gScl = The desired gyroscope scale. Must be one of three possible
5hel2l2y 0:46630122dec9 228 * values from the gyro_scale enum.
5hel2l2y 0:46630122dec9 229 */
5hel2l2y 0:46630122dec9 230 void setGyroScale(gyro_scale gScl);
5hel2l2y 0:46630122dec9 231
5hel2l2y 0:46630122dec9 232 /** setAccelScale() -- Set the full-scale range of the accelerometer.
5hel2l2y 0:46630122dec9 233 * This function can be called to set the scale of the accelerometer to
5hel2l2y 0:46630122dec9 234 * 2, 4, 8, or 16 g's.
5hel2l2y 0:46630122dec9 235 * Input:
5hel2l2y 0:46630122dec9 236 * - aScl = The desired accelerometer scale. Must be one of five possible
5hel2l2y 0:46630122dec9 237 * values from the accel_scale enum.
5hel2l2y 0:46630122dec9 238 */
5hel2l2y 0:46630122dec9 239 void setAccelScale(accel_scale aScl);
5hel2l2y 0:46630122dec9 240
5hel2l2y 0:46630122dec9 241 /** setGyroODR() -- Set the output data rate and bandwidth of the gyroscope
5hel2l2y 0:46630122dec9 242 * Input:
5hel2l2y 0:46630122dec9 243 * - gRate = The desired output rate and cutoff frequency of the gyro.
5hel2l2y 0:46630122dec9 244 * Must be a value from the gyro_odr enum (check above).
5hel2l2y 0:46630122dec9 245 */
5hel2l2y 0:46630122dec9 246 void setGyroODR(gyro_odr gRate);
5hel2l2y 0:46630122dec9 247
5hel2l2y 0:46630122dec9 248 /** setAccelODR() -- Set the output data rate of the accelerometer
5hel2l2y 0:46630122dec9 249 * Input:
5hel2l2y 0:46630122dec9 250 * - aRate = The desired output rate of the accel.
5hel2l2y 0:46630122dec9 251 * Must be a value from the accel_odr enum (check above).
5hel2l2y 0:46630122dec9 252 */
5hel2l2y 0:46630122dec9 253 void setAccelODR(accel_odr aRate);
5hel2l2y 0:46630122dec9 254
5hel2l2y 0:46630122dec9 255
5hel2l2y 0:46630122dec9 256 private:
5hel2l2y 0:46630122dec9 257 /** xgAddress store the I2C address
5hel2l2y 0:46630122dec9 258 * for each sensor.
5hel2l2y 0:46630122dec9 259 */
5hel2l2y 0:46630122dec9 260 uint8_t xgAddress;
5hel2l2y 0:46630122dec9 261
5hel2l2y 0:46630122dec9 262 // I2C bus
5hel2l2y 0:46630122dec9 263 I2C i2c;
5hel2l2y 0:46630122dec9 264
5hel2l2y 0:46630122dec9 265 /** gScale, and aScale store the current scale range for each
5hel2l2y 0:46630122dec9 266 * sensor. Should be updated whenever that value changes.
5hel2l2y 0:46630122dec9 267 */
5hel2l2y 0:46630122dec9 268 gyro_scale gScale;
5hel2l2y 0:46630122dec9 269 accel_scale aScale;
5hel2l2y 0:46630122dec9 270
5hel2l2y 0:46630122dec9 271 /** gRes, and aRes store the current resolution for each sensor.
5hel2l2y 0:46630122dec9 272 * Units of these values would be DPS (or g's or Gs's) per ADC tick.
5hel2l2y 0:46630122dec9 273 * This value is calculated as (sensor scale) / (2^15).
5hel2l2y 0:46630122dec9 274 */
5hel2l2y 0:46630122dec9 275 float gRes, aRes;
5hel2l2y 0:46630122dec9 276
5hel2l2y 0:46630122dec9 277 /** initGyro() -- Sets up the gyroscope to begin reading.
5hel2l2y 0:46630122dec9 278 * This function steps through all three gyroscope control registers.
5hel2l2y 0:46630122dec9 279 */
5hel2l2y 0:46630122dec9 280 void initGyro();
5hel2l2y 0:46630122dec9 281
5hel2l2y 0:46630122dec9 282 /** initAccel() -- Sets up the accelerometer to begin reading.
5hel2l2y 0:46630122dec9 283 * This function steps through all accelerometer related control registers.
5hel2l2y 0:46630122dec9 284 */
5hel2l2y 0:46630122dec9 285 void initAccel();
5hel2l2y 0:46630122dec9 286
5hel2l2y 0:46630122dec9 287 /** calcgRes() -- Calculate the resolution of the gyroscope.
5hel2l2y 0:46630122dec9 288 * This function will set the value of the gRes variable. gScale must
5hel2l2y 0:46630122dec9 289 * be set prior to calling this function.
5hel2l2y 0:46630122dec9 290 */
5hel2l2y 0:46630122dec9 291 void calcgRes();
5hel2l2y 0:46630122dec9 292
5hel2l2y 0:46630122dec9 293 /** calcaRes() -- Calculate the resolution of the accelerometer.
5hel2l2y 0:46630122dec9 294 * This function will set the value of the aRes variable. aScale must
5hel2l2y 0:46630122dec9 295 * be set prior to calling this function.
5hel2l2y 0:46630122dec9 296 */
5hel2l2y 0:46630122dec9 297 void calcaRes();
5hel2l2y 0:46630122dec9 298 };
5hel2l2y 0:46630122dec9 299
5hel2l2y 0:46630122dec9 300 #endif // _LSM6DS3_H //