DHT sensor for measuring temperature

Files at this revision

API Documentation at this revision

Comitter:
agaikwad
Date:
Thu Jul 06 18:49:18 2017 +0000
Parent:
2:df22ddf10d75
Commit message:
V1

Changed in this revision

DHT.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/DHT.cpp	Fri Aug 15 20:55:43 2014 +0000
+++ b/DHT.cpp	Thu Jul 06 18:49:18 2017 +0000
@@ -139,10 +139,10 @@
     int v;
 
     switch (_DHTtype) {
-        case DHT11:
+        case DHT22:
             v = DHT_data[2];
             return float(v);
-        case DHT22:
+        case DHT11:
             v = DHT_data[2] & 0x7F;
             v *= 256;
             v += DHT_data[3];