1
Dependents: Task_1_BallRidingbot_KeepingStationCatching_layingDown_1230
Fork of MPU9250_SPI by
Diff: MPU9250.h
- Revision:
- 12:2b7b98cf595c
- Parent:
- 11:084e8ba240c1
diff -r 084e8ba240c1 -r 2b7b98cf595c MPU9250.h --- a/MPU9250.h Tue Jul 01 13:59:45 2014 +0000 +++ b/MPU9250.h Wed Feb 15 12:33:22 2017 +0000 @@ -7,7 +7,6 @@ #define mpu9250_h #include "mbed.h" - class mpu9250_spi { SPI& spi; @@ -33,7 +32,7 @@ uint8_t AK8963_whoami(); void AK8963_read_Magnetometer(); void read_all(); - + void readAngles(); float acc_divider; @@ -42,16 +41,24 @@ int calib_data[3]; float Magnetometer_ASA[3]; + float accelerometer_data[3]; float Temperature; float gyroscope_data[3]; float Magnetometer[3]; + //float dt ;//= 0; + //float dt_sensors ;//= 0; private: PinName _CS_pin; PinName _SO_pin; PinName _SCK_pin; float _error; + + Timer LoopTimer; // local time to calculate processing speed for entire loop + Timer SensorTimer; // local time to calculate processing speed for just reading sensors + uint8_t Mscale; //= 10.*4912./32760.0; 10.*4912./32760.0; MFS_16BITS + uint8_t Mmode ; //= 0x02; }; #endif