IMU 10dof MEMS from DR Robot adapted from HK10DOF Changed gyro to ITG3200
Fork of HK10DOF by
BMP085.h
00001 /* 00002 * BMP085.h 00003 * 00004 * Created on: 13 juil. 2013 00005 * Author: Vincent 00006 */ 00007 00008 #ifndef BMP085_H_ 00009 #define BMP085_H_ 00010 00011 #include "mbed.h" 00012 00013 class BMP085{ 00014 00015 public : 00016 00017 static const int I2C_ADDRESS = 0xEE; // sensor address 00018 00019 BMP085(PinName sda, PinName scl); 00020 00021 00022 BMP085(I2C &i2c) : i2c_(i2c) { 00023 //init(); 00024 } 00025 00026 ~BMP085(); 00027 00028 void writeRegister(unsigned char r, unsigned char v); 00029 00030 // read a 16 bit register 00031 int readIntRegister(unsigned char r); 00032 00033 // read uncompensated temperature value 00034 unsigned int readUT(); 00035 00036 00037 // read uncompensated pressure value 00038 long readUP(); 00039 00040 // Below there are the utility functions to get data from the sensor. 00041 00042 // read temperature and pressure from sensor 00043 void readSensor(); 00044 00045 void getCalibrationData(); 00046 00047 float press(void); 00048 00049 float temp(void); 00050 00051 float altitud(void); 00052 00053 00054 private : 00055 00056 I2C &i2c_; 00057 // variables to keep the values 00058 float temperature; 00059 float pressure; 00060 00061 00062 char i2cRaw[sizeof(I2C)]; 00063 }; 00064 00065 00066 #endif /* BMP085_H_ */ 00067
Generated on Wed Jul 20 2022 02:40:41 by 1.7.2