Snippet Tag: Mag sensor

gyro, acc. , magneto with Arduino

/************************************************************************** I2C ADDRESS/BITS **************************************************************************/ #define LSM9DS0_DEFAULT_ADDRESS_GYRO (0x6A) // D4 >> 1 = 7-bit default #define LSM9DS0_ADDRESS_GYRO_UPDATED (0x6B) // D6 >> 1 = 7-bit default #define LSM9DS0_DEFAULT_ADDRESS_ACCELMAG (0x1E) // 3C >> 1 = 7-bit default #define LSM9DS0_ADDRESS_ACCELMAG_UPDATED (0x1D) // 3B >> 1 = 7-bit default #define LSM9DS0_ACCELMAG_DEV_ID (0x49) // 0100 1001 #define LSM9DS0_GYRO_DEV_ID (0xD4) // 1101 0100 /************************************************************************** CONVERSION DELAY (in mS) **************************************************************************/ #define LSM9DS0_CONVERSIONDELAY (100) /************************************************************************** GYROSCOPE REGISTERS **************************************************************************/ #define LSM9DS0_REG_GYRO_WHO_AM_I (0x0F) // Device identification Register #define LSM9DS0_REG_GYRO_CTRL_REG1 (0x20) // Gyroscope Control Register 1 #define LSM9DS0_REG_GYRO_CTRL_REG2 (0x21) // Gyroscope Control Register 2 #define LSM9DS0_REG_GYRO_CTRL_REG3 (0x22) // Gyroscope Control Register 3

Read More »