#include <LiquidCrystal.h>
#include <dht.h>
int tempPin = 3; // Defines pin number to which the sensor is connected
dht DHT; // Create a DHT object
int RS = 13;
int EN = 12;
int D4 = 11;
int D5 = 10;
int D6 = 6;
int D7 = 5;
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("Digitronic");
delay(1000);
lcd.clear();
}
void loop() {
int readData = DHT.read22(tempPin); // Reads the data from the DHT
float TEMP = DHT.temperature; // Gets the values of the temperature
float HUMI = DHT.humidity; // Gets the values of the humidity
// float is using to handle a decimal number
lcd.setCursor(0, 0);
lcd.print("TEMP: ");
lcd.print(TEMP);
lcd.setCursor(0, 1);
lcd.print("HUMI: ");
lcd.print(HUMI);
delay(1000);
}