1

As mentioned in the title I'm facing a problem in printing strings in the LCD. It's printing actually weird characters.

#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);
}

You can find the output of the LCD in the picture below:

LCD error !!

3
  • 5
    You've goofed up the hardware side. Feb 1 '16 at 13:13
  • 2
    Agreed - it certainly hasn't initialized properly - it's in 16x1 mode not 16x2 mode, which means the 16x2 instruction never got through, so most likely you have your data lines in the wrong order.
    – Majenko
    Feb 1 '16 at 13:24
  • 3
    And that looks like some pretty shoddy soldering. That's a good example of go home and do it again. Feb 1 '16 at 19:19
1

Whenever I use an LCD display I make sure to use the I2C backpack. It takes actual effort to hook it up wrong if you use them. So if this were me, I would desolder all those pins and get one.

Here is a good description of how they work: https://learn.adafruit.com/i2c-spi-lcd-backpack/overview

1
  • 1
    Exactly my thought. It is possible to do the wiring and protocol yourself, but it will require a lot of pins and probably cause you some headaches.
    – Paul
    Dec 11 '16 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.