DHT11.h 776 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // FILE: dht11.h
  3. // VERSION: 0.4.1
  4. // PURPOSE: DHT11 Temperature & Humidity Sensor library for Arduino
  5. // LICENSE: GPL v3 (http://www.gnu.org/licenses/gpl.html)
  6. //
  7. // DATASHEET: http://www.micro4you.com/files/sensor/DHT11.pdf
  8. //
  9. // URL: http://playground.arduino.cc/Main/DHT11Lib
  10. //
  11. // HISTORY:
  12. // George Hadjikyriacou - Original version
  13. // see dht.cpp file
  14. //
  15. #ifndef dht11_h
  16. #define dht11_h
  17. #if defined(ARDUINO) && (ARDUINO >= 100)
  18. #include <Arduino.h>
  19. #else
  20. #include <WProgram.h>
  21. #endif
  22. #define DHT11LIB_VERSION "0.4.1"
  23. #define DHTLIB_OK 0
  24. #define DHTLIB_ERROR_CHECKSUM -1
  25. #define DHTLIB_ERROR_TIMEOUT -2
  26. class dht11
  27. {
  28. public:
  29. int read(int pin);
  30. int humidity;
  31. int temperature;
  32. };
  33. #endif
  34. //
  35. // END OF FILE
  36. //