Library for the control of the DHT22.
Dependents: Interfacage_Disco_DHT22
Diff: DHT22.cpp
- Revision:
- 2:8c7fa818f329
- Parent:
- 1:3385bd532812
--- a/DHT22.cpp Thu Apr 16 08:55:38 2020 +0000 +++ b/DHT22.cpp Thu Apr 16 12:00:14 2020 +0000 @@ -7,6 +7,7 @@ DigitalInOut dht(pin_name); dht.output(); dht.write(1); + thread_sleep_for(2); } short DHT22::shortFromBits(bool bits[]) @@ -101,12 +102,12 @@ return 1; } -int DHT22::getTemperature() +float DHT22::getTemperature() { return m_temperature; } -int DHT22::getHumidity() +float DHT22::getHumidity() { return m_humidity; } \ No newline at end of file