Amanda Travieso
/
HumiditySenor
Outputs humidity to the serial terminal.
HIH_4010.h
- Committer:
- atravieso
- Date:
- 2015-07-27
- Revision:
- 1:e59c75779477
- Parent:
- 0:a8fcc4098c24
File content as of revision 1:e59c75779477:
#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 */ };