reading diff-pressure form OMRON D6F-PH0505

Committer:
Chillee
Date:
Sat Jun 27 10:17:59 2015 +0000
Revision:
0:1d476876f987
Diff-Pressure Sensor from OMRON

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Chillee 0:1d476876f987 1 #ifndef D6F_PH_H
Chillee 0:1d476876f987 2 #define D6F_PH_H
Chillee 0:1d476876f987 3
Chillee 0:1d476876f987 4 #define D6F_ADDR 0xD8
Chillee 0:1d476876f987 5
Chillee 0:1d476876f987 6 class D6F_PH{
Chillee 0:1d476876f987 7 private:
Chillee 0:1d476876f987 8 I2C *_i2c;
Chillee 0:1d476876f987 9
Chillee 0:1d476876f987 10 // D6F-PH function
Chillee 0:1d476876f987 11 char d6f_config[5];
Chillee 0:1d476876f987 12 char d6f_comp_read[4];
Chillee 0:1d476876f987 13 char d6f_temp_read[4];
Chillee 0:1d476876f987 14 char d6f_mem_read[1];
Chillee 0:1d476876f987 15 char d6f_init[2];
Chillee 0:1d476876f987 16
Chillee 0:1d476876f987 17 public:
Chillee 0:1d476876f987 18
Chillee 0:1d476876f987 19 /** Constructor - create a connection to a D6F-PH diff-pressure and reference temperature sensor
Chillee 0:1d476876f987 20 * through an I2C interface
Chillee 0:1d476876f987 21 *
Chillee 0:1d476876f987 22 * @param *i2c a pointer to the i2c interface that is used for communication
Chillee 0:1d476876f987 23 */
Chillee 0:1d476876f987 24 D6F_PH(I2C *i2c);
Chillee 0:1d476876f987 25
Chillee 0:1d476876f987 26 /** Read the diff-pressure value from the sensor \n
Chillee 0:1d476876f987 27 *
Chillee 0:1d476876f987 28 *
Chillee 0:1d476876f987 29 *
Chillee 0:1d476876f987 30 *
Chillee 0:1d476876f987 31 *
Chillee 0:1d476876f987 32 * @param returns a value representing the temperature in degrees centigrade
Chillee 0:1d476876f987 33 */
Chillee 0:1d476876f987 34 float read_pressure();
Chillee 0:1d476876f987 35
Chillee 0:1d476876f987 36 /** Read the reference temperature value from the sensor \n
Chillee 0:1d476876f987 37 *
Chillee 0:1d476876f987 38 *
Chillee 0:1d476876f987 39 *
Chillee 0:1d476876f987 40 *
Chillee 0:1d476876f987 41 *
Chillee 0:1d476876f987 42 * @param returns the percentage humidity
Chillee 0:1d476876f987 43 */
Chillee 0:1d476876f987 44 float read_d6f_temp();
Chillee 0:1d476876f987 45
Chillee 0:1d476876f987 46 /**
Chillee 0:1d476876f987 47 * Perform a soft-reset of the sensor unit.
Chillee 0:1d476876f987 48 */
Chillee 0:1d476876f987 49 uint8_t init();
Chillee 0:1d476876f987 50
Chillee 0:1d476876f987 51 };
Chillee 0:1d476876f987 52
Chillee 0:1d476876f987 53 #endif // D6FS_PH_H