Crud, LCD Shield doesn't work

My LCD Shield came in the mail today, so I copied the code from the following link, loaded it into the Arduino, and I see NOTHING. I can adjust the brightness pot on the shield, but the message is not there. Given the code came from SparkFun do I have a defective unit???

http://linksprite.com/wiki/index.php5?t … or_Arduino

#include <LiquidCrystal.h>

LiquidCrystal lcd( 8, 9, 4, 5, 6, 7 );

void setup()

{

lcd.begin(16, 2);

lcd.print(“hello, world!”);

}

void loop()

{

// your main loop code here…

}

Bob Diaz

Where’s your power coming from?

The code you are running is not the code in the link you gave. In that code, the pins assigned to the LCD include pin 13 (missing from your example). Try it.

#include <LiquidCrystal.h>
#include <LCDKeypad.h>
LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);
int oldkey=-1;
etc.

skimask:
Where’s your power coming from?

It comes from the USB Connection, could that be a problem???

Bob

jremington:
The code you are running is not the code in the link you gave. In that code, the pins assigned to the LCD include pin 13 (missing from your example). Try it.

#include <LiquidCrystal.h>

#include <LCDKeypad.h>
LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);
int oldkey=-1;
etc.

I did try the first code listed in the link. When that failed, I tried:

"Minimal Display Example

To start up the LCD and display a message, open a new sketch in the Arduino IDE and paste in the following code:"

Found lower in the page, neither worked.

Neither code seems to work for me. :violin:

Most LCD displays, when powered up, show a faint outline of squares in the upper row. You may also see a blinking cursor at the first position if it has been properly initialized. Do you see any change at all in the display when you power it up? Exactly what effect on the display does the contrast adjustment have?

jremington:
Most LCD displays, when powered up, show a faint outline of squares in the upper row. You may also see a blinking cursor at the first position if it has been properly initialized. Do you see any change at all in the display when you power it up? Exactly what effect on the display does the contrast adjustment have?

The top row does show all dark squares and the bottom row is blank. Adjusting the contrast does change that, but no adjustment seems to work.

Bob Diaz

If no blinking cursor, the LCD is not being properly initialized. It is powered, so either the LCD is defective or there is a bad connection to the Arduino.

Thanks, I’m going to try a few more things, then send an email to SparkFun.

Bob Diaz

Very strange, I tested all the output pins on the Arduino and it seemed OK, but just in case, I connected it to another Arduino I just purchased and BINGO, it works !!! I’m not sure what went wrong, but now I have a nice short test program that I know will display the whole character set:

#include <LiquidCrystal.h>

LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);

void setup()

{

lcd.begin(16, 2);

lcd.clear();

lcd.setCursor(0,0);

lcd.print("It works !!! ");

lcd.setCursor(0,1);

lcd.print(“WOW !!!”);

delay(1000);

}

void loop()

{

// your main loop code here…

lcd.clear();

lcd.setCursor(0,1);

for (int j = 0 ; j < 256 :wink:

{

for (int i = 0 ; i < 16; i++)

{

lcd.setCursor(i,0);

lcd.print(char(i+j));

lcd.setCursor(i,1);

lcd.print(char(i+j+16));

}

delay(2500);

j = j + 32 ;

}

}