dht.2.ino 286 Bytes
Newer Older
B.Nagasuman's avatar
B.Nagasuman committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <dht.h>

dht DHT;

#define DHT11_PIN 2

void setup(){

  Serial.begin(9600);
}

void loop(){
  int chk = DHT.read11(DHT11_PIN);
  Serial.print("Temperature = ");
  Serial.println(DHT.temperature);
  Serial.print("Humidity = ");
  Serial.println(DHT.humidity);
  delay(1000);
}