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

Committer:
maetugr
Date:
Mon Nov 05 09:19:01 2012 +0000
Revision:
20:e116e596e540
Parent:
18:c8c09a3913ba
Eine Achse stabil! bereits abgehoben an Schnur! (erst Gyro im I2C_Sensor)(acos nan abgefangen)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
maetugr 18:c8c09a3913ba 1 // based on http://mbed.org/users/okini3939/code/BMP085/
maetugr 18:c8c09a3913ba 2
maetugr 14:cf260677ecde 3 #ifndef BMP085_H
maetugr 14:cf260677ecde 4 #define BMP085_H
maetugr 14:cf260677ecde 5
maetugr 16:74a6531350b5 6 #include "mbed.h"
maetugr 14:cf260677ecde 7 #include "I2C_Sensor.h"
maetugr 14:cf260677ecde 8
maetugr 14:cf260677ecde 9 #define BMP085_I2C_ADDRESS 0xEE
maetugr 14:cf260677ecde 10
maetugr 14:cf260677ecde 11 class BMP085 : public I2C_Sensor
maetugr 14:cf260677ecde 12 {
maetugr 14:cf260677ecde 13 public:
maetugr 14:cf260677ecde 14 BMP085(PinName sda, PinName scl);
maetugr 14:cf260677ecde 15
maetugr 18:c8c09a3913ba 16 //virtual void read();
maetugr 14:cf260677ecde 17
maetugr 14:cf260677ecde 18 void calibrate(int s);
maetugr 14:cf260677ecde 19
maetugr 18:c8c09a3913ba 20 float get_height();
maetugr 14:cf260677ecde 21
maetugr 14:cf260677ecde 22 private:
maetugr 14:cf260677ecde 23 // raw data and function to measure it
maetugr 14:cf260677ecde 24 int raw[3];
maetugr 20:e116e596e540 25 //void readraw();
maetugr 14:cf260677ecde 26
maetugr 14:cf260677ecde 27 // calibration parameters and their saving
maetugr 14:cf260677ecde 28 int Min[3];
maetugr 14:cf260677ecde 29 int Max[3];
maetugr 14:cf260677ecde 30 float scale[3];
maetugr 14:cf260677ecde 31 float offset[3];
maetugr 14:cf260677ecde 32 };
maetugr 14:cf260677ecde 33
maetugr 14:cf260677ecde 34 #endif