Outputs humidity to the serial terminal.

Dependencies:   mbed

Committer:
atravieso
Date:
Thu Apr 14 18:59:42 2016 +0000
Revision:
2:4edb77a5ab26
Parent:
HIH_4010.h@0:a8fcc4098c24
Export for Dan

Who changed what in which revision?

UserRevisionLine numberNew contents of line
atravieso 0:a8fcc4098c24 1
atravieso 0:a8fcc4098c24 2
atravieso 0:a8fcc4098c24 3 #include "mbed.h"
atravieso 0:a8fcc4098c24 4
atravieso 0:a8fcc4098c24 5 class HIH4010 {
atravieso 0:a8fcc4098c24 6
atravieso 0:a8fcc4098c24 7 public:
atravieso 0:a8fcc4098c24 8
atravieso 0:a8fcc4098c24 9 HIH4010(float dataPin, float supplyVoltage, float referenceVoltage);
atravieso 0:a8fcc4098c24 10
atravieso 0:a8fcc4098c24 11 float getSensorRH();
atravieso 0:a8fcc4098c24 12 float getTrueRH(float temperature);
atravieso 0:a8fcc4098c24 13 float vout();
atravieso 0:a8fcc4098c24 14
atravieso 0:a8fcc4098c24 15 private:
atravieso 0:a8fcc4098c24 16 float pin; /* IO pin connected to sensor's data pin */
atravieso 0:a8fcc4098c24 17 float vSupply; /* voltage supplying the humidity sensor */
atravieso 0:a8fcc4098c24 18 float slope; /* value may be calculated or factory calibrated */
atravieso 0:a8fcc4098c24 19 float zeroOffset; /* value may be calcualted or factory calibrated */
atravieso 0:a8fcc4098c24 20 float vRef; /* analog voltage reference, in volts */
atravieso 0:a8fcc4098c24 21
atravieso 0:a8fcc4098c24 22 };
atravieso 0:a8fcc4098c24 23