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.
Diff: Sensors/Alt/BMP085.h
- Revision:
- 34:3aa1cbcde59d
- Child:
- 40:2ca410923691
diff -r fd98776b6cc7 -r 3aa1cbcde59d Sensors/Alt/BMP085.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sensors/Alt/BMP085.h Mon Jun 10 13:22:46 2013 +0000 @@ -0,0 +1,34 @@ +// based on http://mbed.org/users/okini3939/code/BMP085/ + +#ifndef BMP085_H +#define BMP085_H + +#include "mbed.h" +#include "I2C_Sensor.h" + +#define BMP085_I2C_ADDRESS 0xEE + +class BMP085 : public I2C_Sensor +{ + public: + BMP085(PinName sda, PinName scl); + + //virtual void read(); + + void calibrate(int s); + + float get_height(); + + private: + // raw data and function to measure it + int raw[3]; + //void readraw(); + + // calibration parameters and their saving + int Min[3]; + int Max[3]; + float scale[3]; + float offset[3]; +}; + +#endif