HD44780 16x2 LCD - Arduino Uno - liquidcrystal lib - all pixels are activated

Hi, thank you for your time, I would really appreciate your help on this.

My LCD activates all pixels in first row when I ask him to write text (no matter what text length), when using the clear function the pixels get deactivated. So I tend to think the problem lies in the crystal lib or in the lcd itself.

#include <dht.h>
#include <LiquidCrystal.h>

#define dataPIN 2

LiquidCrystal lcd(12, 11, 10, 9, 8, 7);

dht DHT;

void setup()
{
  Serial.begin(9600);
  lcd.begin(16, 2);
}

void loop()
{
  int read_data = DHT.read22(dataPIN);
  float t = DHT.temperature;
  float h = DHT.humidity;

  //Serial.print("Temperature: ");
  //Serial.print(t);
  //Serial.println("°C");

  //Serial.print("Humidity: ");
  //Serial.print(h);
  //Serial.println("%");

  //Serial.println("-----");

  lcd.print("hello world");
  delay(5000);
  lcd.clear();
  delay(5000);
}

Thank you for your help!

I had some difficulties sending an illustration of my problem here it is

IMG_1627.JPG.zip (1.8 MB)

You will need to solder the header strip to the LCD to have any hope of the LCD working reliably.

From OP image:
solder header.jpg

How to post images.

solder header.jpg

Thank you for your answer, I will try to solder the header.

In other words, what you have described is the self-initialisation of the display. It is actually getting power, but since some of the data connections are missing, it is not responding to the code.

Note that whilst the forum actually allows you to post .zip files, most people will will refuse to open them due to the inherent security risk. :astonished: