#include<DHT.h>
#include <LiquidCrystal.h>
#define DHTPIN 13
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
Serial.begin(9600);
Serial.println("DHT22 Test!");
dht.begin();
lcd.begin(16, 2);
// Print a message to the LCD.
}
void loop() {
delay(2000);
float h = dht.readHumidity();
float t = dht.readTemperature();
// Serial.print("Humidity:\t");
// Serial.println(h);
// delay(500);
// Serial.print("Temperature:\t");
// Serial.println(t);
lcd.setCursor(0, 0);
// print the number of seconds since reset:
lcd.print("Tempratue: ");
lcd.print(t);
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print("Humidity: ");
lcd.print(h);
}