sensor
Diff: BME280.cpp
- Revision:
- 4:ddcaa259e65b
- Parent:
- 3:d4eb81284ea0
diff -r d4eb81284ea0 -r ddcaa259e65b BME280.cpp --- a/BME280.cpp Tue May 12 12:07:25 2015 +0000 +++ b/BME280.cpp Tue May 12 13:32:09 2015 +0000 @@ -9,7 +9,7 @@ * https://www.switch-science.com/catalog/2236/ * * For more information about the BME280: - * http://ae-bst.resource.bosch.com/media/products/dokumente/bme280/BST-BME280_DS001-09.pdf + * http://ae-bst.resource.bosch.com/media/products/dokumente/bme280/BST-BME280_DS001-10.pdf */ #include "mbed.h" @@ -110,14 +110,6 @@ i2c.write(address, cmd, 1); i2c.read(address, &cmd[1], 3); - //cmd[0] = 0xfb; // temp_lsb - //i2c.write(address, cmd, 1); - //i2c.read(address, &cmd[2], 1); - - //cmd[0] = 0xfc; // temp_xlsb - //i2c.write(address, cmd, 1); - //i2c.read(address, &cmd[3], 1); - temp_raw = (cmd[1] << 12) | (cmd[2] << 4) | (cmd[3] >> 4); int32_t temp; @@ -143,14 +135,6 @@ i2c.write(address, cmd, 1); i2c.read(address, &cmd[1], 3); - //cmd[0] = 0xf8; // press_lsb - //i2c.write(address, cmd, 1); - //i2c.read(address, &cmd[2], 1); - - //cmd[0] = 0xf9; // press_xlsb - //i2c.write(address, cmd, 1); - //i2c.read(address, &cmd[3], 1); - press_raw = (cmd[1] << 12) | (cmd[2] << 4) | (cmd[3] >> 4); int32_t var1, var2; @@ -189,10 +173,6 @@ i2c.write(address, cmd, 1); i2c.read(address, &cmd[1], 2); - //cmd[0] = 0xfe; // hum_lsb - //i2c.write(address, cmd, 1); - //i2c.read(address, &cmd[2], 1); - hum_raw = (cmd[1] << 8) | cmd[2]; int32_t v_x1;