MtSense01 Easy use interface

Dependents:   Mt05_MtSense01

Committer:
johnathanlyu
Date:
Fri Jun 02 08:02:08 2017 +0000
Revision:
1:26745d857755
Parent:
0:c95ce83462a0
Child:
2:9a301d7b8f44
MtSense01 include BMP250 & SHT25

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 "BMP280.h"
johnathanlyu 0:c95ce83462a0 6 #include "SHT2X.h"
johnathanlyu 0:c95ce83462a0 7
johnathanlyu 0:c95ce83462a0 8 class MtSense01 {
johnathanlyu 0:c95ce83462a0 9 public:
johnathanlyu 0:c95ce83462a0 10 MtSense01(I2C& i2c);
johnathanlyu 0:c95ce83462a0 11 int Initial();
johnathanlyu 0:c95ce83462a0 12 int readData(float* pTemperature = NULL, int* pPressure = NULL, float* pHumidity = NULL);
johnathanlyu 0:c95ce83462a0 13 float getTemperature();
johnathanlyu 0:c95ce83462a0 14 float getPressure();
johnathanlyu 0:c95ce83462a0 15 float getHumidity();
johnathanlyu 0:c95ce83462a0 16
johnathanlyu 0:c95ce83462a0 17 protected:
johnathanlyu 0:c95ce83462a0 18 SHT2X sht21;
johnathanlyu 0:c95ce83462a0 19 BMP280 bmp280;
johnathanlyu 0:c95ce83462a0 20 private:
johnathanlyu 0:c95ce83462a0 21
johnathanlyu 0:c95ce83462a0 22 };
johnathanlyu 0:c95ce83462a0 23
johnathanlyu 0:c95ce83462a0 24 #endif