Outputs humidity to the serial terminal.

Dependencies:   mbed

HIH_4010.h

Committer:
atravieso
Date:
2015-06-23
Revision:
0:a8fcc4098c24

File content as of revision 0:a8fcc4098c24:



#include "mbed.h"

class HIH4010 {

public:

HIH4010(float dataPin, float supplyVoltage, float referenceVoltage);

float getSensorRH();
float getTrueRH(float temperature);
float vout();

private:
float pin; /* IO pin connected to sensor's data pin */
float vSupply; /* voltage supplying the humidity sensor */
float slope; /* value may be calculated or factory calibrated */
float zeroOffset; /* value may be calcualted or factory calibrated */
float vRef; /* analog voltage reference, in volts */

};