antimo angelino
/
Drone_F3
LSM9DS1 i2c
LSM9DS1Reg.h@3:8e50680d6b4e, 2018-07-08 (annotated)
- Committer:
- antimo8@alice.it
- Date:
- Sun Jul 08 11:20:11 2018 +0200
- Revision:
- 3:8e50680d6b4e
add files
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
antimo8@alice.it | 3:8e50680d6b4e | 1 | /* |
antimo8@alice.it | 3:8e50680d6b4e | 2 | * LSM9DS1Reg.h |
antimo8@alice.it | 3:8e50680d6b4e | 3 | * |
antimo8@alice.it | 3:8e50680d6b4e | 4 | * Created: 26/04/2015 14:17:29 |
antimo8@alice.it | 3:8e50680d6b4e | 5 | * Author: speirano |
antimo8@alice.it | 3:8e50680d6b4e | 6 | */ |
antimo8@alice.it | 3:8e50680d6b4e | 7 | |
antimo8@alice.it | 3:8e50680d6b4e | 8 | |
antimo8@alice.it | 3:8e50680d6b4e | 9 | #ifndef LSM9DS1_REG_H_ |
antimo8@alice.it | 3:8e50680d6b4e | 10 | #define LSM9DS1_REG_H_ |
antimo8@alice.it | 3:8e50680d6b4e | 11 | |
antimo8@alice.it | 3:8e50680d6b4e | 12 | |
antimo8@alice.it | 3:8e50680d6b4e | 13 | |
antimo8@alice.it | 3:8e50680d6b4e | 14 | /* Accelerometer / Gyroscope */ |
antimo8@alice.it | 3:8e50680d6b4e | 15 | #define LSM9DS1_AG_ADDRESS 0x6A |
antimo8@alice.it | 3:8e50680d6b4e | 16 | |
antimo8@alice.it | 3:8e50680d6b4e | 17 | #define AG_WHO_AM_I 0x0F |
antimo8@alice.it | 3:8e50680d6b4e | 18 | #define AG_WHO_AM_I_RETURN 0x68 |
antimo8@alice.it | 3:8e50680d6b4e | 19 | |
antimo8@alice.it | 3:8e50680d6b4e | 20 | #define AG_CTRL_REG1_G 0x10 |
antimo8@alice.it | 3:8e50680d6b4e | 21 | #define AG_ODR_SET 0x20 |
antimo8@alice.it | 3:8e50680d6b4e | 22 | |
antimo8@alice.it | 3:8e50680d6b4e | 23 | #define AG_STATUS_REG 0x27 |
antimo8@alice.it | 3:8e50680d6b4e | 24 | #define AG_ACCELEROMETER_READY 0x01 |
antimo8@alice.it | 3:8e50680d6b4e | 25 | #define AG_GYROSCOPE_READY 0x02 |
antimo8@alice.it | 3:8e50680d6b4e | 26 | #define AG_ACC_X_L 0x28 |
antimo8@alice.it | 3:8e50680d6b4e | 27 | #define AG_ACC_X_H 0x29 |
antimo8@alice.it | 3:8e50680d6b4e | 28 | #define AG_ACC_Y_L 0x2A |
antimo8@alice.it | 3:8e50680d6b4e | 29 | #define AG_ACC_Y_H 0x2B |
antimo8@alice.it | 3:8e50680d6b4e | 30 | #define AG_ACC_Z_L 0x2C |
antimo8@alice.it | 3:8e50680d6b4e | 31 | #define AG_ACC_Z_H 0x2D |
antimo8@alice.it | 3:8e50680d6b4e | 32 | |
antimo8@alice.it | 3:8e50680d6b4e | 33 | #define AG_GYR_X_L 0x18 |
antimo8@alice.it | 3:8e50680d6b4e | 34 | #define AG_GYR_X_H 0x19 |
antimo8@alice.it | 3:8e50680d6b4e | 35 | #define AG_GYR_Y_L 0x1A |
antimo8@alice.it | 3:8e50680d6b4e | 36 | #define AG_GYR_Y_H 0x1B |
antimo8@alice.it | 3:8e50680d6b4e | 37 | #define AG_GYR_Z_L 0x1C |
antimo8@alice.it | 3:8e50680d6b4e | 38 | #define AG_GYR_Z_H 0x1D |
antimo8@alice.it | 3:8e50680d6b4e | 39 | /* Magnetometer */ |
antimo8@alice.it | 3:8e50680d6b4e | 40 | |
antimo8@alice.it | 3:8e50680d6b4e | 41 | #define LSM9DS1_M_ADDRESS 0x1C |
antimo8@alice.it | 3:8e50680d6b4e | 42 | |
antimo8@alice.it | 3:8e50680d6b4e | 43 | #define M_WHO_AM_I 0x0F |
antimo8@alice.it | 3:8e50680d6b4e | 44 | #define M_WHO_AM_I_RETURN 0x3D |
antimo8@alice.it | 3:8e50680d6b4e | 45 | |
antimo8@alice.it | 3:8e50680d6b4e | 46 | #define M_CTRL_REG1_G 0x20 |
antimo8@alice.it | 3:8e50680d6b4e | 47 | #define M_ODR_SET 0x20 |
antimo8@alice.it | 3:8e50680d6b4e | 48 | #define M_CTRL_REG3_G 0x22 |
antimo8@alice.it | 3:8e50680d6b4e | 49 | #define M_OPER_MODE_CONT 0x00 |
antimo8@alice.it | 3:8e50680d6b4e | 50 | #define M_OPER_MODE_SINGLE 0x01 |
antimo8@alice.it | 3:8e50680d6b4e | 51 | #define M_OPER_MODE_DIS 0x03 |
antimo8@alice.it | 3:8e50680d6b4e | 52 | |
antimo8@alice.it | 3:8e50680d6b4e | 53 | #define M_STATUS_REG 0x27 |
antimo8@alice.it | 3:8e50680d6b4e | 54 | //#define M_ZYX_X_AXIS_READY 0x01 |
antimo8@alice.it | 3:8e50680d6b4e | 55 | //#define M_ZYX_Y_AXIS_READY 0x02 |
antimo8@alice.it | 3:8e50680d6b4e | 56 | //#define M_ZYX_Z_AXIS_READY 0x03 |
antimo8@alice.it | 3:8e50680d6b4e | 57 | #define M_ZYX_AXIS_READY 0x08 |
antimo8@alice.it | 3:8e50680d6b4e | 58 | |
antimo8@alice.it | 3:8e50680d6b4e | 59 | #define M_X_L 0x28 |
antimo8@alice.it | 3:8e50680d6b4e | 60 | #define M_X_H 0x29 |
antimo8@alice.it | 3:8e50680d6b4e | 61 | #define M_Y_L 0x2A |
antimo8@alice.it | 3:8e50680d6b4e | 62 | #define M_Y_H 0x2B |
antimo8@alice.it | 3:8e50680d6b4e | 63 | #define M_Z_L 0x2C |
antimo8@alice.it | 3:8e50680d6b4e | 64 | #define M_Z_H 0x2D |
antimo8@alice.it | 3:8e50680d6b4e | 65 | |
antimo8@alice.it | 3:8e50680d6b4e | 66 | |
antimo8@alice.it | 3:8e50680d6b4e | 67 | /*Sensors Sensitivity */ |
antimo8@alice.it | 3:8e50680d6b4e | 68 | |
antimo8@alice.it | 3:8e50680d6b4e | 69 | /* |
antimo8@alice.it | 3:8e50680d6b4e | 70 | * Linear acceleration : Reg6_XL FS[1:0] = 00g +-2, 10+-4g 11+-8g |
antimo8@alice.it | 3:8e50680d6b4e | 71 | * ranges: |
antimo8@alice.it | 3:8e50680d6b4e | 72 | * +-2 g mg/LSB = 0.061 |
antimo8@alice.it | 3:8e50680d6b4e | 73 | * +-4 g mg/LSB = 0.122 |
antimo8@alice.it | 3:8e50680d6b4e | 74 | * +-8 g mg/LSB = 0.244 |
antimo8@alice.it | 3:8e50680d6b4e | 75 | */ |
antimo8@alice.it | 3:8e50680d6b4e | 76 | #define A_LSB_SENSIT_2MG 0.061 |
antimo8@alice.it | 3:8e50680d6b4e | 77 | #define A_LSB_SENSIT_4MG 0.122 |
antimo8@alice.it | 3:8e50680d6b4e | 78 | #define A_LSB_SENSIT_8MG 0.244 |
antimo8@alice.it | 3:8e50680d6b4e | 79 | |
antimo8@alice.it | 3:8e50680d6b4e | 80 | /* |
antimo8@alice.it | 3:8e50680d6b4e | 81 | * Angular rate: CTRL_REG1 FS_G[1:0] 00 245, 01 500, 11 2000 |
antimo8@alice.it | 3:8e50680d6b4e | 82 | * +-245 mdps/LSB = 8.75 |
antimo8@alice.it | 3:8e50680d6b4e | 83 | * +-500 mdps/LSB = 17.50 |
antimo8@alice.it | 3:8e50680d6b4e | 84 | * +-2000 mdps/LSB = 70 |
antimo8@alice.it | 3:8e50680d6b4e | 85 | */ |
antimo8@alice.it | 3:8e50680d6b4e | 86 | #define G_LSB_SENSIT_245MDPS 8.75 |
antimo8@alice.it | 3:8e50680d6b4e | 87 | #define G_LSB_SENSIT_500DPS 17.5 |
antimo8@alice.it | 3:8e50680d6b4e | 88 | #define G_LSB_SENSIT_2KMDPS 70 |
antimo8@alice.it | 3:8e50680d6b4e | 89 | /* |
antimo8@alice.it | 3:8e50680d6b4e | 90 | * Magnetic : REG2_M FS[1:0] 00 +-4 01 +-8 10 +-12 11+-16 |
antimo8@alice.it | 3:8e50680d6b4e | 91 | * +-4 mgauss/LSB = 0.14 |
antimo8@alice.it | 3:8e50680d6b4e | 92 | * +-8 mgauss/LSB = 0.29 |
antimo8@alice.it | 3:8e50680d6b4e | 93 | * +-12 mgauss/LSB = 0.43 |
antimo8@alice.it | 3:8e50680d6b4e | 94 | * +-16 mgauss/LSB = 0.58 |
antimo8@alice.it | 3:8e50680d6b4e | 95 | */ |
antimo8@alice.it | 3:8e50680d6b4e | 96 | #define M_LSB_SENSIT_4MG 0.14 |
antimo8@alice.it | 3:8e50680d6b4e | 97 | #define M_LSB_SENSIT_8MG 0.29 |
antimo8@alice.it | 3:8e50680d6b4e | 98 | #define M_LSB_SENSIT_12MG 0.43 |
antimo8@alice.it | 3:8e50680d6b4e | 99 | #define M_LSB_SENSIT_16MG 0.58 |
antimo8@alice.it | 3:8e50680d6b4e | 100 | |
antimo8@alice.it | 3:8e50680d6b4e | 101 | |
antimo8@alice.it | 3:8e50680d6b4e | 102 | #endif /* INCFILE1_H_ */ |