Library to control a BMP180 sensor.

BMP180 sensor

Revision:
1:608e890e88e7
Parent:
0:373de0f4d5cd
diff -r 373de0f4d5cd -r 608e890e88e7 BMP180.h
--- a/BMP180.h	Fri Aug 26 00:19:21 2016 +0000
+++ b/BMP180.h	Sun Aug 28 23:28:03 2016 +0000
@@ -8,8 +8,10 @@
 
 #include "mbed.h"
 
-///  default address is 0xEF => (0x77<<1) ?
+///  default address is 0xEF => (0x77<<1 + 1)
 #define BMP180_I2C_ADDRESS  0xEF
+#define DEGREES             '\u00B0'
+#define DEGREES_CELCIUS     "\u00B0C"
 
 // Oversampling settings
 typedef enum {
@@ -65,7 +67,7 @@
          *   1 on success,
          *   0 on error
          */
-        int ReadData(float& pTemperature, float& pPressure);
+        int readData(float& pTemperature, float& pPressure);
 
     protected:
         /** Perform temperature measurement
@@ -96,10 +98,10 @@
         I2C m_i2c;
         char m_data[2];
 
-        short ac1, ac2, ac3, b1, b2, md;
         //short mb; // Not used?
-        unsigned short ac4, ac5, ac6;
-        long x1, x2, x3, b3, b5, b6, mc;
+        uint16_t ac4, ac5, ac6;
+        int16_t ac1, ac2, ac3, b1, b2, b5, md;
+        long x1, x2, x3, b3, b6, mc;
         unsigned long b4, b7;
 };