An fully working IMU-Filter and Sensor drivers for the 10DOF-Board over I2C. All in one simple class. Include, calibrate sensors, call read, get angles. (3D Visualisation code for Python also included) Sensors: L3G4200D, ADXL345, HMC5883, BMP085
Diff: IMU/Sensors/Alt/BMP085.h
- Revision:
- 0:3e7450f1a938
- Child:
- 4:f62337b907e5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IMU/Sensors/Alt/BMP085.h Tue Aug 27 17:37:06 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