HDC1080 sensor library

Committer:
shivanandgowdakr
Date:
Sat Oct 06 12:08:55 2018 +0000
Revision:
0:fdb750cc9ca8
Child:
1:a0e46d956969
HDC1080 Temperature Humidity Sensor ; i2c based or  controlled ;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shivanandgowdakr 0:fdb750cc9ca8 1
shivanandgowdakr 0:fdb750cc9ca8 2 #ifndef HDC1080_H
shivanandgowdakr 0:fdb750cc9ca8 3 #define HDC1080_H
shivanandgowdakr 0:fdb750cc9ca8 4
shivanandgowdakr 0:fdb750cc9ca8 5
shivanandgowdakr 0:fdb750cc9ca8 6
shivanandgowdakr 0:fdb750cc9ca8 7
shivanandgowdakr 0:fdb750cc9ca8 8
shivanandgowdakr 0:fdb750cc9ca8 9
shivanandgowdakr 0:fdb750cc9ca8 10 class HDC1080:public I2C {
shivanandgowdakr 0:fdb750cc9ca8 11 public:
shivanandgowdakr 0:fdb750cc9ca8 12
shivanandgowdakr 0:fdb750cc9ca8 13
shivanandgowdakr 0:fdb750cc9ca8 14
shivanandgowdakr 0:fdb750cc9ca8 15 HDC1080( PinName sda, PinName slc) ; // constructor
shivanandgowdakr 0:fdb750cc9ca8 16
shivanandgowdakr 0:fdb750cc9ca8 17 // ~HDC1080(); // destructor
shivanandgowdakr 0:fdb750cc9ca8 18
shivanandgowdakr 0:fdb750cc9ca8 19 int ReadSignature(void);
shivanandgowdakr 0:fdb750cc9ca8 20 float readTemperature( void); // to read the Temperature from HDC1080
shivanandgowdakr 0:fdb750cc9ca8 21 float readHumidity(void); // to read the Humidity from HDC1080
shivanandgowdakr 0:fdb750cc9ca8 22 unsigned long readSerialNumber(void); // to read the Humidity from HDC1080
shivanandgowdakr 0:fdb750cc9ca8 23
shivanandgowdakr 0:fdb750cc9ca8 24 protected:
shivanandgowdakr 0:fdb750cc9ca8 25 uint16_t read2Bytes(int chip_addr, int offset);
shivanandgowdakr 0:fdb750cc9ca8 26 };
shivanandgowdakr 0:fdb750cc9ca8 27
shivanandgowdakr 0:fdb750cc9ca8 28 #endif
shivanandgowdakr 0:fdb750cc9ca8 29
shivanandgowdakr 0:fdb750cc9ca8 30