Snippet Tag: setup lsm device

Setup device

void LSM9DS0::setUpGyroscope(void) { // Set Up the Configuration for the Gyroscope Control Register 1 /* // Set the Output Data Rate uint8_t config1 = lsm_gyrodatarate; // Set the Power Down Mode Enable config1 |= lsm_gyromode; // Set the Gyroscpe Z-Axis Enable config1 |= lsm_gyrozen; // Set the Gyroscpe Y-Axis Enable config1 |= lsm_gyroyen; // Set the Gyroscpe X-Axis Enable config1 |= lsm_gyroxen; */ uint8_t config1 = LSM9DS0_REG_GYRO_CTRL_REG1_PD_NORMAL | // Normal Mode LSM9DS0_REG_GYRO_CTRL_REG1_ZEN_ENABLE | // Gyroscope Z-Axis Enabled LSM9DS0_REG_GYRO_CTRL_REG1_YEN_ENABLE | // Gyroscope Y-Axis Enabled LSM9DS0_REG_GYRO_CTRL_REG1_XEN_ENABLE; // Gyroscope X-Axis Enabled config1 |= lsm_gyrodatarate; // Output Data Rate and Bandwidth Selection // Write

Read More »