summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/lsm303dlm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/lsm303dlm.h b/drivers/lsm303dlm.h
index d58b31b..1c4956d 100644
--- a/drivers/lsm303dlm.h
+++ b/drivers/lsm303dlm.h
@@ -13,12 +13,12 @@ class LSM303DLM_A {
LSM303DLM_A(I2C& i2c_bus) : i2c(i2c_bus) {}
void init() {
- i2c.write_reg(0x18, 0x20, 0x27); // Normal mode, 50 Hz.
+ i2c.write_reg(0x19, 0x20, 0x27); // Normal mode, 50 Hz.
}
void update() {
uint8_t buf[6];
- i2c.read_reg(0x18, 0xa8, 6, buf);
+ i2c.read_reg(0x19, 0xa8, 6, buf);
x = (buf[1] << 8 | buf[0]) - 0;
y = (buf[3] << 8 | buf[2]) - 0;