daily pastebin goal
58%
SHARE
TWEET

dht11.pde

garamycin Jul 21st, 2012 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <dht11.h>
  2.  
  3. dht11 DHT11;
  4.  
  5. #define DHT11PIN 54
  6.  
  7. void setup()
  8. {
  9.   Serial.begin(9600);
  10.   Serial.println("DHT11 TEST PROGRAM ");
  11.   Serial.print("LIBRARY VERSION: ");
  12.   Serial.println(DHT11LIB_VERSION);
  13.   Serial.println();
  14. }
  15.  
  16. void loop()
  17. {
  18.   int chk = DHT11.read(DHT11PIN);
  19.  
  20.   Serial.print("Humidity (%): ");
  21.   Serial.println((float)DHT11.humidity, 2);
  22.  
  23.   Serial.print("Temperature (oC): ");
  24.   Serial.println((float)DHT11.temperature, 2);
  25.  
  26.   delay(2000);
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top