#include <LiquidCrystal.h>
int d4=19, d5=21, d6=22, d7=23, rs=26, e=25;
LiquidCrystal Lcd(rs, e, d4, d5, d6, d7);
#include "DHT.h"
#define DHTTYPE DHT22
#define dht_pin 18
DHT dht(dht_pin, DHTTYPE);
float t=0, h=0;
void setup() {
dht.begin();
Lcd.begin(16, 2);
Serial.begin(9600);
delay(2000);
}
void loop() {
Lcd.setCursor(0,0);
t=dht.readTemperature();
h=dht.readHumidity();
Lcd.print("Temp= ");
Lcd.println(t);
Lcd.print("cel");
Lcd.setCursor(0, 1);
Lcd.print("Hum= ");
Lcd.print(h);
Lcd.print("%");
delay(1000); // this speeds up the simulation
}