// 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);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // RS, E, D4, D5, D6, D7
byte customChar[8] = {
0b11111,
0b00100,
0b00100,
0b11100,
0b00101,
0b11101,
0b00101,
0b00101
};
byte customChar[8] = {
0b11111,
0b00101,
0b01001,
0b11100,
0b00101,
0b11101,
0b00101,
0b00101
};
#define DHTPIN 33
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
void setup() {
// set up the LCD's number of columns and rows:
// lcd.begin(16, 2);
// dht.begin();
// Print a message to the LCD.
lcd.begin(16, 2);
lcd.createChar(0, customChar);
lcd.home();
lcd.write(0);
}
void loop() {
delay(2000);
float h = dht.readHumidity();
float t = dht.readTemperature();
lcd.setCursor(0,0);
lcd.print("Humidity:\t");
lcd.print(h);
lcd.print("%\n");
delay(500);
lcd.print("Temperature:\t");
lcd.print(t);
lcd.print("*C\n");
//lcd.scrollDisplayLeft();