Export for Dan

Dependencies:   mbed MODSERIAL1

Committer:
atravieso
Date:
Thu Apr 14 19:03:32 2016 +0000
Revision:
9:b2debb0a6272
Parent:
5:14a21c3812ed
This outputs humidity, and elapsed time (in seconds).  Outputs X, Y, and Z accelerations although only zeros (compare with working Accelerometer program to find prob).  Responds to serial interrupts of old format.  No compass interaction implemented.

Who changed what in which revision?

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