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/I2C_Sensor.h
- Revision:
- 18:c8c09a3913ba
- Parent:
- 17:e096e85f6c36
- Child:
- 20:e116e596e540
--- a/Sensors/I2C_Sensor.h Wed Oct 31 16:53:01 2012 +0000 +++ b/Sensors/I2C_Sensor.h Sat Nov 03 07:44:07 2012 +0000 @@ -10,9 +10,9 @@ public: I2C_Sensor(PinName sda, PinName scl, int8_t address); - float data[3]; - void read(); - void calibrate(); + float data[3]; // where the measured data is saved + virtual void read() = 0; // read all axis from register to array data + //TODO: virtual void calibrate() = 0; // calibrate the sensor and if desired write calibration values to a file protected: // Calibration value saving @@ -26,7 +26,7 @@ // raw data and function to measure it int raw[3]; - void readraw(); + //virtual void readraw() = 0; private: I2C i2c; // I2C-Bus