LCD problem.

Hi.

I recently bought an Arduino Mega, and I also got an LCD diplay from a friend. I connected the shield to the board, but when I upload the code, it doesn't happen anything. Also, only the first row seems to be initialized. I uploaded a picture below.

|375x500

You have to post the code.

It's the "HelloWorld" code from Examples...

You need to check the pins used by the shield against the pins used in the sketch and make sure they match the SHIELD.

Some of these shields used different pin layouts.

Would suggest to check with your shield source HERE for demo sketches first.

This pinout section of your sketch should match this line "LiquidCrystal lcd(8, 9, 4, 5, 6, 7);"

Problems with LCD displays are in most cases caused by either

  1. Bad soldering
  2. Wrong wiring
  3. Mismatch of library and constructor (= the code line which @Ballscrewbob posted) as libraries, constructor and wiring (Arduino <-> display) have to match
  4. mis- adjustment of contrast potentiometer

Thank you very much for the answers. Indeed, the problem was with the pins. After modyfing the lcd constructor to the above values it worked. Thank you again. :)

You are most welcome.