HDC1000 library

Dependents:   Condensation_Monitor mbed_HDC1000 BLE_Condensation_Monitor GR-PEACH_TAMORI

See http://developer.mbed.org/users/yasuyuki/notebook/HDC1000/

HDC1000.h

Committer:
yasuyuki
Date:
2015-01-28
Revision:
0:82c214412005
Child:
1:45126276dbf3

File content as of revision 0:82c214412005:

//**********************
// HDC1000.h for mbed
//
// (C)Copyright 2015 All rights reserved by Y.Onodera
// http://einstlab.web.fc2.com
//**********************
#ifndef HDC1000_H_
#define HDC1000_H_

#define HDC1000_ADDR            0x80
#define HDC1000_TEMP            0x00
#define HDC1000_HUM             0x01
#define HDC1000_CONFIG          0x02
#define HDC1000_SERIAL0         0xFB
#define HDC1000_SERIAL1         0xFC
#define HDC1000_SERIAL2         0xFD
#define HDC1000_MAMUFUCTUREER   0xFE
#define HDC1000_DEVICE          0xFF

#include "mbed.h"
#include "typedef.h"

class HDC1000{
public:
    HDC1000 (PinName sda, PinName scl);
    HDC1000 (I2C& p_i2c);

    void get();
    int humidity();
    int temperature();
    void init();

protected:
    
    I2C _i2c;

    WORD_VAL hum;
    WORD_VAL temp;
    char buf[8];

};

#endif /* HDC1000_H_ */