base program for tilt measurement
Dependencies: COG4050_ADT7420 ADXL362
Fork of COG4050_adxl355_adxl357-ver2 by
Diff: ADXL35x/ADXL355.h
- Revision:
- 6:45d2393ef468
- Parent:
- 4:23b53636b576
- Child:
- 7:5aaa09c40283
diff -r 05af38b6375a -r 45d2393ef468 ADXL35x/ADXL355.h --- a/ADXL35x/ADXL355.h Wed Aug 08 12:13:05 2018 +0000 +++ b/ADXL35x/ADXL355.h Tue Aug 14 06:49:07 2018 +0000 @@ -5,7 +5,11 @@ class ADXL355 { public: - + const static float t_sens = -9.05; + const static float t_bias = 1852; + float axis355_sens; + float axis357_sens; + // -------------------------- // // REGISTERS // // -------------------------- // @@ -47,7 +51,6 @@ SELF_TEST = 0x2E, RESET = 0x2F } ADXL355_register_t; - // -------------------------- // // REGISTERS - DEFAULT VALUES // // -------------------------- // @@ -103,7 +106,7 @@ RANGE2G = 0x01, RANGE4G = 0x02, RANGE8G = 0x03, - RANGE10 = 0x00, + RANGE10 = 0x01, RANGE20 = 0x02, RANGE40 = 0x03 } ADXL355_range_ctl_t; @@ -125,7 +128,7 @@ void write_reg_u16(ADXL355_register_t reg, uint16_t data); uint8_t read_reg(ADXL355_register_t reg); uint16_t read_reg_u16(ADXL355_register_t reg); - uint32_t read_reg_u32(ADXL355_register_t reg); + uint32_t read_reg_u20(ADXL355_register_t reg); // ADXL general register R/W methods void set_power_ctl_reg(uint8_t data); void set_filter_ctl_reg(ADXL355_filter_ctl_t hpf, ADXL355_filter_ctl_t odr);