/* Hello Wokwi! */
#include <LiquidCrystal_I2C.h>
#include <DHT.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
#define DHTPIN 2
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
void setup() {
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Temperatura:");
dht.begin();
}
void loop() {
delay(2000);
lcd.setCursor(0, 1);
float t = dht.readTemperature();
lcd.print(t);
lcd.print(" st. C");
}