summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2012-07-29 13:31:12 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2012-07-29 13:31:12 +0200
commit7099e9c67abe16f78d62f53ddaa8c75f015d098a (patch)
treec797dce1d6e44f02d6158b1cdb408b7e824efa0c /drivers
parentbc92d78701c860ccd13d3da407570e5b03c96961 (diff)
Changed LSM303DLM address.
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;