// include the library code:
#include<DHT.h>
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(19, 23, 18, 2, 4, 15);
#define DHTPIN 33
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
byte customChar[] = {
B00100,
B00100,
B01110,
B10001,
B10101,
B10001,
B01110,
B00000
};
byte customChart[] = {
B11000,
B11000,
B00110,
B01001,
B01000,
B01000,
B01001,
B00110
};
void setup() {
lcd.begin(16, 2);
dht.begin();
lcd.createChar(0, customChar);
lcd.createChar(1, customChart);
}
void loop() {
//delay(2000);
float h = dht.readHumidity();
float t = dht.readTemperature();
lcd.setCursor(0,0);
lcd.write(byte(0));
lcd.print(" Humidity:\t");
lcd.print(h);
// lcd.print("%\n");
// delay(500);
lcd.setCursor(0,1);
lcd.write(byte(1));
lcd.print(" Temperature:\t");
lcd.print(t);
//lcd.print("*C\n");
// for (int i = 1; i < 16; i++) {
lcd.scrollDisplayLeft();
delay(200);
// }
}