Chris LU / LSM9DS0_self_riding_bike

Fork of LSM9DS0 by Chris LU

Files at this revision

API Documentation at this revision

Comitter:
cpul5338
Date:
Mon Feb 13 14:32:36 2017 +0000
Parent:
4:e79b970b0258
Child:
11:08c1c6f4c648
Commit message:
LSM9DS0

Changed in this revision

LSM9DS0.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/LSM9DS0.cpp	Thu Aug 18 14:59:18 2016 +0000
+++ b/LSM9DS0.cpp	Mon Feb 13 14:32:36 2017 +0000
@@ -41,7 +41,7 @@
 //
 //=================================
 
-LSM9DS0::LSM9DS0(interface_mode interface, uint8_t gAddr, uint8_t xmAddr) : interfaceMode(SPI_MODE), spi_(D4,D5,D3), i2c_(I2C_SDA,I2C_SCL), csG_(D7), csXM_(D6)
+LSM9DS0::LSM9DS0(interface_mode interface, uint8_t gAddr, uint8_t xmAddr) : interfaceMode(SPI_MODE), spi_(D4,D5,D3), i2c_(I2C_SDA,I2C_SCL), csG_(D9), csXM_(D6)
 {
     // interfaceMode will keep track of whether we're using SPI or I2C:
     interfaceMode = interface;
@@ -197,7 +197,7 @@
         00=normal (no self-test), 01=positive st, 10=negative st, 11=not allowed
     SIM - SPI mode selection
         0=4-wire, 1=3-wire                                                   */
-    xmWriteByte(CTRL_REG2_XM, 0xD8); // Set scale to 2g
+    xmWriteByte(CTRL_REG2_XM, 0xC8); // Set scale to 2g
     
     /* CTRL_REG3_XM is used to set interrupt generators on INT1_XM
     Bits (7-0): P1_BOOT P1_TAP P1_INT1 P1_INT2 P1_INTM P1_DRDYA P1_DRDYM P1_EMPTY