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
BMP085_old.h
00001 00002 #ifndef BMP085_I2C_H 00003 #define BMP085_I2C_H 00004 00005 #include "mbed.h" 00006 00007 class BMP085_old 00008 { 00009 private: 00010 I2C i2c_; 00011 00012 public: 00013 BMP085_old(PinName sda, PinName scl); 00014 00015 void Update(); 00016 float Temperature; 00017 float Pressure; 00018 float CalcAltitude(float Press); 00019 short oss; 00020 00021 protected: 00022 void Init(); 00023 unsigned short twi_readshort (int, int); 00024 unsigned long twi_readlong (int, int); 00025 void twi_writechar (int, int, int); 00026 00027 00028 private: 00029 00030 short AC1, AC2, AC3, B1, B2, MB, MC, MD; 00031 unsigned short AC4, AC5, AC6; 00032 }; 00033 00034 #endif
Generated on Wed Jul 13 2022 22:03:48 by 1.7.2