Temp and Humidity sensor device driver.
Dependents: temp_hum IAC_send Smart_Home_sensors
Fork of DHT by
Diff: DHT.cpp
- Revision:
- 3:cae680d96375
- Parent:
- 2:df22ddf10d75
--- a/DHT.cpp Fri Aug 15 20:55:43 2014 +0000 +++ b/DHT.cpp Thu Dec 01 04:44:54 2016 +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]; @@ -211,10 +211,10 @@ int v; switch (_DHTtype) { - case DHT11: + case DHT22: v = DHT_data[0]; return float(v); - case DHT22: + case DHT11: v = DHT_data[0]; v *= 256; v += DHT_data[1];