LSM303DLHC library with Free Fall Interrupt Initialisation.
Fork of LSM303DLHC by
Diff: LSM303DLHC.cpp
- Revision:
- 5:ee458711d467
- Parent:
- 3:4d9465e7e10e
- Child:
- 6:0b1dad2f6270
diff -r 612f7d5a822d -r ee458711d467 LSM303DLHC.cpp --- a/LSM303DLHC.cpp Thu Feb 21 00:20:17 2013 +0000 +++ b/LSM303DLHC.cpp Wed Feb 03 20:08:41 2016 +0000 @@ -80,11 +80,11 @@ _LSM303(sda, scl) { char reg_v; - _LSM303.frequency(100000); + _LSM303.frequency(200000); reg_v = 0; - reg_v |= 0x27; /* X/Y/Z axis enable. */ + reg_v |= 0x37; /* X/Y/Z axis enable. */ write_reg(addr_acc,CTRL_REG1_A,reg_v); reg_v = 0; @@ -94,7 +94,7 @@ /* -- mag --- */ reg_v = 0; - reg_v |= 0x04 << 2; /* Minimum data output rate = 15Hz */ + reg_v |= 0x06 << 2; /* Minimum data output rate = 15Hz */ write_reg(addr_mag,CRA_REG_M,reg_v); reg_v = 0;