#include <LCD-I2C.h>
#include "DHT.h"
#define DHTPIN 2
#define DHTTYPE DHT22
DHT yam(DHTPIN, DHTTYPE);
DHT mac(DHTPIN, DHTTYPE);
LCD_I2C lcd(0x27, 16, 2);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.begin();
lcd.display();
lcd.backlight();
yam.begin();
}
void loop() {
float t = yam.readTemperature();
float h = yam.readHumidity();
lcd.setCursor(0,0);
lcd.print("temp =");
lcd.print(t);
lcd.setCursor(7,1);
lcd.print("hum = ");
lcd.print(h);
}