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/Acc/ADXL345.h
- Revision:
- 40:2ca410923691
- Parent:
- 33:fd98776b6cc7
--- a/Sensors/Acc/ADXL345.h Wed Aug 28 00:30:38 2013 +0000 +++ b/Sensors/Acc/ADXL345.h Fri Feb 14 14:17:32 2014 +0000 @@ -53,13 +53,15 @@ { public: ADXL345(PinName sda, PinName scl); // constructor, uses I2C_Sensor class - virtual void read(); // read all axis to array + float data[3]; // where the measured data is saved + void read(); // read all axis to array float offset[3]; // offset that's subtracted from every measurement void calibrate(int times, float separation_time); // calibration from 'times' measurements with 'separation_time' time between (get an offset while not moving) private: - virtual void readraw(); + int raw[3]; + void readraw(); }; #endif