Permalink
Browse files

L3G: updated library to get it to work with L3GD20H

  • Loading branch information...
1 parent b0970e5 commit 35f462e91a5916a3fa44c2a159c0a8618c2b6448 Jeremy (Pololu) committed with kevin-pololu Feb 5, 2014
Showing with 4 additions and 2 deletions.
  1. +2 −2 L3G/L3G.cpp
  2. +2 −0 L3G/L3G.h
View
@@ -140,9 +140,9 @@ bool L3G::autoDetectAddress(void)
address = L3G4200D_ADDRESS_SA0_HIGH;
if (readReg(L3G_WHO_AM_I) == 0xD3) return true;
address = L3GD20_ADDRESS_SA0_LOW;
- if (readReg(L3G_WHO_AM_I) == 0xD4) return true;
+ if (readReg(L3G_WHO_AM_I) == 0xD4 || readReg(L3G_WHO_AM_I) == 0xD7) return true;
address = L3GD20_ADDRESS_SA0_HIGH;
- if (readReg(L3G_WHO_AM_I) == 0xD4) return true;
+ if (readReg(L3G_WHO_AM_I) == 0xD4 || readReg(L3G_WHO_AM_I) == 0xD7) return true;
return false;
}
View
@@ -48,6 +48,8 @@
#define L3G_INT1_THS_ZH 0x36
#define L3G_INT1_THS_ZL 0x37
#define L3G_INT1_DURATION 0x38
+#define L3G_LOW_ODR 0x39
+
class L3G
{

0 comments on commit 35f462e

Please sign in to comment.