#include <LiquidCrystal.h>
#include <dht.h>
int dataPin = 8 // Defines pin number to which the sensor is connected
dht DHT; // Creats a DHT object
int RS = 13;
int EN = 12;
int D4 = 11;
int D5 = 10;
int D6 = 9;
int D7 = 8;
LiquidCrystal lcd(RS, EN, D4, D5, D6, D7);
int count = 0;
void setup() {
lcd.begin(16, 2);
lcd.setCursor(3, 0);
lcd.print("WELCOME TO");
lcd.setCursor(2, 1);
lcd.print("RajtronixTech");
delay(1000);
lcd.clear();
}
void loop() {
int readData = DHT.read22(dataPin); // Reads the data from the sensor
float TEMP = DHT.temperature; // Gets the values of the temperature
float HUMI = DHT.humidity; // Gets the values of the humidity
lcd.setCursor(0, 0);
lcd.print("TEMP: ");
lcd.print(TEMP);
lcd.setCursor(0, 1);
lcd.print("HUMI: ");
lcd.print(HUMI);
delay(1000);
}