A library for the use of AM2303 (a.k.a. DHT22), a temperature and humidity sensor.
Dependents: AM2303_Hello_World
Fork of DHT11 by
Revision 3:8cd064147bde, committed 2014-09-10
- Comitter:
- s_inoue_mbed
- Date:
- Wed Sep 10 17:10:42 2014 +0000
- Parent:
- 2:1e997b7a1f9a
- Child:
- 4:48798b126d93
- Commit message:
- Doxygen description has been corrected.
Changed in this revision
DHT11.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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,