New topic - LCD Problem

My previous post was not very clear so I am starting a new post...Please don't merge them.

When my humidity sensor is connected to my 2 * 16 LCD, the LCD starts showing weird characters...I am using a DHT11 Temperature and Humidity Sensor...

I wanted to print the temperature in the first line and the humidity in the second line. For a split second sometimes it becomes proper but then returns back to its weird characters..

Here is my code:-

#include<LiquidCrystal.h>
#include <DHT.h>

const int dhtPin = 8;
#define DHTTYPE DHT11

DHT dht ( dhtPin, DHTTYPE );

LiquidCrystal lcd ( 12, 11, 5, 4, 3, 2 );
int Contrast = 75;

void setup() {
  // put your setup code here, to run once:

  Serial.begin ( 9600 );
  lcd.begin ( 16, 2 );

  analogWrite ( 6, Contrast );
  dht.begin();
}

void loop() {
  // put your main code here, to run repeatedly:

  float c = dht.readTemperature();
  float h = dht.readHumidity();

  lcd.home();

  lcd.print ( "Temperature: " );
  lcd.print ( c );

  lcd.setCursor ( 0, 1 );

  lcd.print ( "Humidity: " );
  lcd.print ( h );
  lcd.print ( "%" );

  delay ( 1000 );
}

The image of the weird characters is attached to this post....

Can someone please help me out? Thank you!!!

I have had the same problems from time to time. Always bad connection. Check you wires.

Checked connections. No problem in connections.

The thing if I remove the sensor and upload a simple hello world program on the LCD it works fine. Code:-

#include <LiquidCrystal.h>

int Contrast = 75;
LiquidCrystal lcd ( 12, 11, 5, 4, 3, 2 );

void setup()
{
  analogWrite ( 6, Contrast );
  lcd.begin ( 16, 2 );

  lcd.home();
  lcd.print ( "Hello World" );
}
void loop() {}

So yeah...Please help me! Thanks!

This was reported as a continuation post and a request to LOCK was made as you dont want to merge.
I agree with the request.