A library for the use of DHT11, a temperature and humidity sensor
Fork of DHT11 by
Diff: DHT11.h
- Revision:
- 3:8cd064147bde
- Parent:
- 2:1e997b7a1f9a
- Child:
- 4:48798b126d93
--- a/DHT11.h Wed Sep 10 17:03:41 2014 +0000 +++ b/DHT11.h Wed Sep 10 17:10:42 2014 +0000 @@ -36,9 +36,6 @@ DHT11(PinName pin); ~DHT11(); - /** Reading the data from the DHT11 */ - int readData(void); - /** Reading the data from the DHT11 * @return Error code * 0: OK. @@ -49,17 +46,18 @@ * 5: Checksum is incorrect. * 6: Timeout */ - + int readData(void); + /** Reading the humidity from the data * @return Humidity in % if readData() returns no error. Otherwise, returns 0xffffffff. */ int readHumidity(void); - - /** Reading the humidity from the data + + /** Reading the temperature from the data * @return Temperature in Celcius if readData() returns no error. Otherwise, returns 0xffffffff. */ int readTemperature(void); - + enum ErrorDHT11 { OK = 0, TOO_FAST_READ = 1,