Use accelerometer to interrupt.
Dependencies: mbed SDFileSystem
Fork of shomberg_hw_7 by
Diff: MMA8452Q.h
- Revision:
- 28:a59485b1626b
- Parent:
- 27:a8ac1c609375
--- a/MMA8452Q.h Thu Nov 15 15:08:42 2018 +0000 +++ b/MMA8452Q.h Fri Nov 16 19:53:25 2018 +0000 @@ -15,16 +15,19 @@ #define OUT_Y_LSB 0x04 #define OUT_Z_MSB 0x05 #define OUT_Z_LSB 0x06 +#define REG_INT_SOURCE 0x0C #define REG_WHO_AM_I 0x0D #define REG_XYZ_DATA_CFG 0x0E -#define REG_CTRL_REG1 0x2A -#define REG_CTRL_REG4 0x2D -#define REG_CTRL_REG5 0x2E + #define REG_TRANSIENT_CFG 0x1D #define REG_TRANSIENT_SRC 0x1E #define REG_TRANSIENT_THS 0x1F #define REG_TRANSIENT_COUNT 0x20 +#define REG_CTRL_REG1 0x2A +#define REG_CTRL_REG4 0x2D +#define REG_CTRL_REG5 0x2E + // WHO_AM_I check #define FACTORY_ID 0x2A @@ -45,8 +48,7 @@ // Init values #define DEFAULT_FSR SCALE_2G -#define DEFAULT_ODR ODR_800HZ - +#define DEFAULT_ODR ODR_50HZ // Class declaration class MMA8452Q