sensor lib

Dependents:   gather_sensor_data

Revision:
0:cbe8cd32b8d9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DHTSensor.h	Thu Sep 08 14:05:15 2016 +0000
@@ -0,0 +1,24 @@
+#ifndef MBED_DHT_SENSOR_H
+#define MBED_DHT_SENSOR_H
+
+#include "mbed.h"
+#include <string> 
+#include "DHT.h"
+#include "sensorTypes.h"
+
+
+class DHTSensor {
+
+public:
+    DHTSensor(PinName pn, int dht_type);
+        
+    sensorStatus readSensor(string &sensor_reading);
+    sensorStatus setReadingType(sensorReadingType sensor_reading_types = DHT_ALL);
+    sensorReadingType getReadingType();
+
+private:
+    DHT dht_sensor;
+    sensorReadingType reading_type;
+};
+
+#endif
\ No newline at end of file