NOT FINISHED YET!!! My first try to get a self built fully working Quadrocopter based on an mbed, a self built frame and some other more or less cheap parts.

Dependencies:   mbed MODI2C

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers BMP085.h Source File

BMP085.h

00001 // based on http://mbed.org/users/okini3939/code/BMP085/
00002 
00003 #ifndef BMP085_H
00004 #define BMP085_H
00005 
00006 #include "mbed.h"
00007 #include "I2C_Sensor.h"
00008 
00009 #define BMP085_I2C_ADDRESS 0xEE
00010 
00011 class BMP085 : public I2C_Sensor
00012 {           
00013     public:
00014         BMP085(PinName sda, PinName scl);
00015         float data;                  // where the measured data is saved
00016         //void read();
00017         
00018         void calibrate(int s);
00019         
00020         float get_height();
00021          
00022     private:
00023         // raw data and function to measure it
00024         int raw;
00025         //void readraw();
00026         
00027         // calibration parameters and their saving
00028         int Min[3];
00029         int Max[3];
00030         float scale[3];
00031         float offset[3];
00032 };
00033 
00034 #endif