From 7099e9c67abe16f78d62f53ddaa8c75f015d098a Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 29 Jul 2012 13:31:12 +0200 Subject: Changed LSM303DLM address. --- drivers/lsm303dlm.h | 4 ++-- 1 file 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; -- cgit v1.2.3