Please help. Wrong output with DHT22

I use this code

dht.setup(35);

delay(dht.getMinimumSamplingPeriod());
float humidity = dht.getHumidity();
float temperature = dht.getTemperature();
lcd.setCursor(0, 0);
lcd.print(dht.getStatusString());
lcd.setCursor(0, 1);
lcd.print(temperature);
delay(5000);

but output is 2.0. when I adjust temp to 80, output is 3.0

From what I understand from the library code, the getTemperature() function returns a string, not a float.
Try:

lcd.print(dht.getTemperature());

dano57ca:
From what I understand from the library code, the getTemperature() function returns a string, not a float.
Try:

lcd.print(dht.getTemperature());

It cannot work.

It can work now. I changed the DHT library to use this GitHub - adafruit/DHT-sensor-library: Arduino library for DHT11, DHT22, etc Temperature & Humidity Sensors.

Thank you