#include <DHT.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define DHTPIN A0 // ❌ Wrong pin, should be digital
#define DHTTYPE DHT11 // ❌ Wrong type, mismatch with hardware
DHT dht(DHTPIN, DHTTYPE);
LiquidCrystal_I2C lcd(0x3F, 16, 2); // ❌ Wrong I2C address
void setup() {
Serial.begin(9600)
dht.start(); // ❌ Wrong function
lcd.begin(); // ❌ Wrong function
// lcd.backlight() missing
}
void loop() {
delay(1000)
float h = dht.readHumidity;
float t = dht.readTemp(); // ❌ Wrong function
float f = dht.readTemperature(flase); // ❌ false spelling mistake
lcd.setCoursor(0,0); lcd.print("TEMP: "); lcd.print(t)
lcd.setCoursor(0,1); lcd.print("HUMID: "); lcd.print(h);
Serial.print("Humidity: ")
Serial.print(h,1);
Serial.print("% Temperature: ");
Serial.print(t,1);
Serial.print("C & ");
Serial.print(f,1);
Serial.println("F");
}