....
Dependents: WizFi310_ThingPlug_Test WizFi310_ThingPlug_Test_P WizFi310_Sensor_Test
Fork of DHT11 by
Diff: Dht11.h
- Revision:
- 0:c1da310d3e8a
- Child:
- 1:5da6f6de3e42
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Dht11.h Sun Feb 15 02:09:00 2015 +0000
@@ -0,0 +1,24 @@
+#ifndef DHT11_H
+#define DHT11_H
+
+#include "mbed.h"
+
+#define DHTLIB_OK 0
+#define DHTLIB_ERROR_CHECKSUM -1
+#define DHTLIB_ERROR_TIMEOUT -2
+
+class Dht11 {
+public:
+ Dht11(PinName p);
+ int read();
+ int temperature();
+ int humidity();
+
+private:
+ int _humidity;
+ int _temperature;
+ DigitalInOut _pin;
+ Timer _timer;
+};
+
+#endif
