MtSense01 Easy use interface

Dependents:   Mt05_MtSense01

Committer:
johnathanlyu
Date:
Fri Jun 02 05:40:46 2017 +0000
Revision:
0:c95ce83462a0
Child:
1:26745d857755
MtSense01 version 1.0.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
johnathanlyu 0:c95ce83462a0 1 #ifndef MTSENSE01_H
johnathanlyu 0:c95ce83462a0 2 #define MTSENSE01_H
johnathanlyu 0:c95ce83462a0 3
johnathanlyu 0:c95ce83462a0 4 #include "mbed.h"
johnathanlyu 0:c95ce83462a0 5 #include "BMP180.h"
johnathanlyu 0:c95ce83462a0 6 #include "BMP280.h"
johnathanlyu 0:c95ce83462a0 7 #include "SHT2X.h"
johnathanlyu 0:c95ce83462a0 8
johnathanlyu 0:c95ce83462a0 9 class MtSense01 {
johnathanlyu 0:c95ce83462a0 10 public:
johnathanlyu 0:c95ce83462a0 11 MtSense01(I2C& i2c);
johnathanlyu 0:c95ce83462a0 12 int Initial();
johnathanlyu 0:c95ce83462a0 13 int readData(float* pTemperature = NULL, int* pPressure = NULL, float* pHumidity = NULL);
johnathanlyu 0:c95ce83462a0 14 float getTemperature();
johnathanlyu 0:c95ce83462a0 15 float getPressure();
johnathanlyu 0:c95ce83462a0 16 float getHumidity();
johnathanlyu 0:c95ce83462a0 17
johnathanlyu 0:c95ce83462a0 18 protected:
johnathanlyu 0:c95ce83462a0 19 BMP180 bmp180;
johnathanlyu 0:c95ce83462a0 20 SHT2X sht21;
johnathanlyu 0:c95ce83462a0 21 BMP280 bmp280;
johnathanlyu 0:c95ce83462a0 22 private:
johnathanlyu 0:c95ce83462a0 23
johnathanlyu 0:c95ce83462a0 24 };
johnathanlyu 0:c95ce83462a0 25
johnathanlyu 0:c95ce83462a0 26 #endif