LSM303DLHC library with Free Fall Interrupt Initialisation.
Fork of LSM303DLHC by
Revision 7:1dabdf7beada, committed 2018-08-23
- Comitter:
- tash1000
- Date:
- Thu Aug 23 18:47:32 2018 +0000
- Parent:
- 6:0b1dad2f6270
- Commit message:
- V 1.1
Changed in this revision
LSM303DLHC.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/LSM303DLHC.cpp Thu Aug 23 18:11:09 2018 +0000 +++ b/LSM303DLHC.cpp Thu Aug 23 18:47:32 2018 +0000 @@ -97,7 +97,7 @@ reg_v = 0; // reg_v |= 0x01 << 6; /* 1: data MSB @ lower address */ - reg_v = 0x10 << 4; /* +/- 8g */ + reg_v = 0x01 << 4; /* +/- 4g */ write_reg(addr_acc,CTRL_REG4_A,reg_v); /* -- mag --- */ @@ -121,7 +121,7 @@ reg_v = 0x40; /* AOI1 interrupt on INT1 */ write_reg(addr_acc,CTRL_REG3_A,reg_v); - reg_v = 0x32; /* 50 Counts --> 0.2g at +- 8g scale (4mg/LSB*/ + reg_v = 0x64; /* 100 Counts --> 0.2g at +- 4g scale (2mg/LSB*/ write_reg(addr_acc,INT1_THS_A,reg_v); reg_v = 0x5; /* 5 Counts --> 50ms duration at 100Hz sampling */