(Solved) Weird Characters on LCD Screen Driving me mad!

Good evening,

Please could someone help. I have been wiring up a 16 x 2 LCD screen with an Arduino Uno and trying various code. At first I got on really well and it was doing exactly as I wanted, learning the code well. then yesterday the screen started showing unusual characters.

I have re-wired it numerous times to ensure that I have done it exactly as it is meant to be. And I have taken the code back to basics but it is still causing the same issue.

I have even bought another LCD screen just in case it was that.

Here is the code: -

#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);


void setup() {

  lcd.begin(16,2);

}

void loop() {
  // put your main code here, to run repeatedly:
  lcd.begin(16,2);
  lcd.setCursor(0,0);
  lcd.print("Hello");
  delay (500);

}

I have also attached a photo for reference.

Hopefully someone will be able to assist.

Thanks.

To start, your header soldering needs to be re-flowed.

LearningtoCode:
Here is the code: -

void loop() {

// put your main code here, to run repeatedly:
  lcd.begin(16,2);
  lcd.setCursor(0,0);
  lcd.print("Hello");
  delay (500);

}

why are you calling begin() every time through loop()?

set it in setup() and forget it!

LarryD:
To start, your header soldering needs to be re-flowed.

+1. Look at the fourth one from the right. It has barely any solder on the actual join.

This might be some other issues, too, since "Hello" does not appear in the correct row-column position. What happens with this code:

#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);


void setup() {

  lcd.begin(16,2);

  lcd.setCursor(0,0);
  lcd.print("                ");    // 16 spaces
  lcd.setCursor(0,1);
  lcd.print("                ");

}

void loop() {
  int i;

  for (i = 0, i < 11; i++) {
    lcd.setCursor(i,0);
    lcd.print("Hello");
    delay (1000);
    lcd.setCursor(i,0);
    lcd.print("                ");    // 16 spaces again
 }
}
1 Like

Try this , eliminates some redundant coding

#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);


void setup() {
  // initialize and clears LCD 
  lcd.begin(16,2);
 delay (5000); // is the display clear for 5 seconds ?
}

void loop() {
  // put your main code here, to run repeatedly:
  lcd.clear(); // clear display 
  lcd.print("Hello");// writes to line 0, position 0
  delay (5000); // show hello for 5 seconds 
lcd.clear(); // clear display 
  lcd.print("The quick brown fox jump over the lazy dog  1234567890" // writes to line 0, starting position 0 uses most ASCII printable characters and may not write all of them on LCD or overwrite some
  delay (5000); // show it for 5 seconds 

}

Hi all,

Thank you for the responses so far.

I have just quickly touched up some of the soldering and also tried the code above but it is still not working. I tried with both screens to see if it made a difference but neither are showing what they are meant to.

Se attached photos.

What does +5v read at the LCD?
With the power off, check the resistance from each pin at the LCD to the corresponding ARDUINO header pin.
The contrast could be lowered.

Have you tried using different pins for the display, like:

LiquidCrystal lcd(12,11,7,6,5,4);

Next, can you test the code on a different Arduino? Finally, do you know that the display works with this LiquidCrystal library? (I think there is more than one LiquidCrystal library.)

LarryD:
What does +5v read at the LCD?
With the power off, check the resistance from each pin at the LCD to the corresponding ARDUINO header pin.
The contrast could be lowered.

I will give this a go when I get home this evening.

econjack:
Have you tried using different pins for the display, like:

LiquidCrystal lcd(12,11,7,6,5,4);

Next, can you test the code on a different Arduino? Finally, do you know that the display works with this LiquidCrystal library? (I think there is more than one LiquidCrystal library.)

I do have an Arduino Micro which I have tried it with but am still getting the same problem. I will try testing the different pins when I get home. Now that is an interesting question with the library. The library was for the first LCD screen I had, although I have bought a similar screen (both 16 x 2 LCD's) I am not sure it is correct, I just assumed it would be. How could I check this?

econjack:
Finally, do you know that the display works with this LiquidCrystal library? (I think there is more than one LiquidCrystal library.)

Thank you!

I have solved it with.... https://learn.sparkfun.com/tutorials/oled-display-hookup-guide/firmware

Being a beginner I didn't realise an OLED display was different. It has to be wired differently and use a different Library.

Thank you all for your responses.

Thank you ! Solved at least my problem !

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.