Go Down

Topic: LCD problem. (Read 182 times) previous topic - next topic

Altair2033

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.


Budvar10

You have to post the code.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

Altair2033

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

ballscrewbob

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);"


It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

rpt007

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

Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

Altair2033

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. :)

ballscrewbob

You are most welcome.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Go Up