dht 11 arduino uno and lcd i2c

Hi, I have a problem with an Arduino programming and I need your help. First, my English is not good, since I am from South America. good step to tell my problem I want to operate a dht11 temperature sensor with an arduino one and an lcd panel with its i2c module. but search the internet and google and only find some what I want is that it looks in the LCD display temperature and humidity of the dht11. But the sketch that I find does not work and they give me problems. Here I attach something of what I could do but without result. From now I hope you can help me and thank you

lcd_dht.ino (729 Bytes)

Please, upload/execute the following program in your UNO and see the results. There are many kinds of Library Files; I could not find a one that matches with your sketch.

#include <dht.h>
dht DHT;
#define DHT11_PIN 2
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()
{
  Serial.begin(9600);
  lcd.init();
  // Turn on the blacklight and print a message.
  lcd.backlight();
}

void loop()
{
  // DISPLAY DATA
  DHT.read11(DHT11_PIN);
  Serial.print(DHT.humidity, 2);
  Serial.print(",\t");
  Serial.println(DHT.temperature, 2);
  //---------------------------------
  lcd.setCursor(0, 0);
  lcd.print(DHT.humidity, 2);
  lcd.setCursor(0, 1);
  lcd.print(DHT.temperature, 2);

  delay(2000);
}

hello look now I see the following when I load the sketch you passed me I get the error

Arduino: 1.8.7 (Windows 10), Card: “Arduino / Genuino Uno”

ERROR: 1: 17: error: dht.h: No such file or directory

compilation terminated.

exit status 1
dht.h: No such file or directory

This report could have more information with
“Show detailed output during compilation”
option enabled in File → Preferences.

I also attach the sketch to you.

thank you forgive me for inconvenience

ERROR.ino (647 Bytes)

You need to include this library in your IDE.

DHT-sensor-library-master.zip (13.9 KB)

Hello again

look and load the library and I get this error

Arduino: 1.8.7 (Windows 10), Card: “Arduino / Genuino Uno”

In file included from C: \ Users \ DJMatias-NoteBook-HP \ Documents \ Arduino \ libraries \ DHT-sensor-library-master \ DHT_U.cpp: 22: 0:

C: \ Users \ DJMatias-NoteBook-HP \ Documents \ Arduino \ libraries \ DHT-sensor-library-master \ DHT_U.h: 25: 29: fatal error: Adafruit_Sensor.h: No such file or directory

compilation terminated.

exit status 1
Error compiling for the Arduino / Genuino Uno card.

This report could have more information with
“Show detailed output during compilation”
option enabled in File → Preferences.

What can be ?

ERROR_2.ino (649 Bytes)

1. Why have you changed #include<dht.h> to #include<DHT.h>?

2. Why have you changed dht DHT; to dht DHT:?

3. This is the output of my dht11 sensor.
sm-12.png

4. This is the sketch that has produced the above result of Step-3.

#include <dht.h> //#include<DHT.h>
dht DHT; //dht DHT:
#define DHT11_PIN 2
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()
{
  Serial.begin(9600);
  lcd.init();
  // Turn on the blacklight and print a message.
  lcd.backlight();
}

void loop()
{
  // DISPLAY DATA
  DHT.read11(DHT11_PIN);
  Serial.print("Humidity: ");
  Serial.print(DHT.humidity, 2);
  Serial.print("%");
  Serial.print(",\t");
  Serial.print("Temp: ");
  Serial.print(DHT.temperature, 2);
  Serial.println("C");
  //---------------------------------
  lcd.setCursor(0, 0);
  lcd.print("Humidity: ");
  lcd.print(DHT.humidity, 2);
  lcd.print("%");
  lcd.setCursor(0, 1);
  lcd.print("Temp:     ");
  lcd.print(DHT.temperature, 2);
  lcd.print("C");

  delay(2000);
}

sm-12.png