Library for Bosch BMP280 temperature and pressure sensor

Dependents:   ELEC350-LCD-DEMO ELEC350-CWTEMPLATE-2017 ELEC351_v1 ELEC350-CWTEMPLATE-2017 ... more

Fork of BMP280 by Edwin Cho

Library for Temperature and Pressure Sensor Bosch BMP280.

Breakoutboard for example from Adafruit

https://learn.adafruit.com/adafruit-bmp280-barometric-pressure-plus-temperature-sensor-breakout/overview

/media/uploads/charly/bmp280.jpg

Files at this revision

API Documentation at this revision

Comitter:
takafuminaka
Date:
Tue May 12 13:32:09 2015 +0000
Parent:
3:d4eb81284ea0
Child:
5:7139d5accbc3
Commit message:
* Changed data sheet URL to new one. (Ver.1.1); * Removed commented out statements.

Changed in this revision

BME280.cpp Show annotated file Show diff for this revision Revisions of this file
BME280.h Show annotated file Show diff for this revision Revisions of this file
--- 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;
--- a/BME280.h	Tue May 12 12:07:25 2015 +0000
+++ b/BME280.h	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
  */
  
 #ifndef MBED_BME280_H