HDC1080 sensor library

HDC1080.h

Committer:
MACRUM
Date:
2019-11-10
Revision:
4:250aceaa7a01
Parent:
1:a0e46d956969

File content as of revision 4:250aceaa7a01:


#ifndef HDC1080_H
#define HDC1080_H

#include "mbed.h"

class HDC1080:public I2C {
public:
    
    HDC1080( PinName sda, PinName slc) ;            // constructor

    int ReadSignature(void);
    float readTemperature( void);                   // to read the Temperature from HDC1080 
    float readHumidity(void);                       // to read the Humidity from HDC1080
    unsigned long readSerialNumber(void);           // to read the Humidity from HDC1080

protected:
     uint16_t read2Bytes(int chip_addr, int offset);
     char _buffer[5];

};

#endif