0
votes

As it mention in the title, LCD is not displaying String it is displaying weird character. Here is the code:

#include <LiquidCrystal.h>

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

void setup() {
  lcd.begin(16, 2);
   Serial.begin(9600);
   lcd.print("hello, world!");

}

void loop() {
    lcd.setCursor(0, 1);
    lcd.print(millis()/500); 
}

and here is what the LCD diplays:

See image enter image description here

2
Again: you've goofed your hardware.Ignacio Vazquez-Abrams
Do you mean a hardware component ?Noorallah Al-herz
As far as I can see the soldering should be checked. At least D6 seems to have no contact...Frank

2 Answers

0
votes

This can have several reasons:

  • the display hardware is broken (but i don't think so, its showing something, but wrong characters)
  • the connections from arduino to the display are wrong
  • at least one connection cable is broken (these small cables break very often at the connector ...)

It's also possible that you drive the display in wrong mode. The data connections can be half-bytes (4 bits) or bytes (8 bits) at once, i.e. you connect either 4 or 8 data cables. The driver must then set the correct mode, else the communication doesn't work correctly (i.e. if you set 8 bit mode and connect 4 cables, the upper 4 bits will have either random or 0 values).

Please check the hardware connections.

0
votes

you seem to be using a 16x2 display if you are you should be able to display even special characters you are setting things in the hardware incorrectly