# Crud, LCD Shield doesn't work

**URL:** <https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188>\
**Category:** Arduino\
**Created:** [July 28, 2013, 1:50am UTC](https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188 "2013-07-28T01:50:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![BobDiaz](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@BobDiaz](https://community.sparkfun.com/u/BobDiaz)\
**Post date:** [July 28, 2013, 1:50am UTC](https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188/1 "2013-07-28T01:50:43Z")

</div>

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](http://linksprite.com/wiki/index.php5?title=16_X_2_LCD_Keypad_Shield_for_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

---

<div class="post-metadata">

**Author:** ![skimask](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@skimask](https://community.sparkfun.com/u/skimask)\
**Post date:** [July 29, 2013, 12:48am UTC](https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188/2 "2013-07-29T00:48:00Z")

</div>

Where’s your power coming from?

---

<div class="post-metadata">

**Author:** ![jremington](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jremington/32/6595_2.png) [@jremington](https://community.sparkfun.com/u/jremington)\
**Post date:** [July 29, 2013, 4:14am UTC](https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188/3 "2013-07-29T04:14:39Z")

</div>

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.

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

```

---

<div class="post-metadata">

**Author:** ![BobDiaz](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@BobDiaz](https://community.sparkfun.com/u/BobDiaz)\
**Post date:** [July 29, 2013, 4:23am UTC](https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188/4 "2013-07-29T04:23:53Z")

</div>

> skimask:  
> Where’s your power coming from?

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

Bob

---

<div class="post-metadata">

**Author:** ![BobDiaz](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@BobDiaz](https://community.sparkfun.com/u/BobDiaz)\
**Post date:** [July 29, 2013, 4:29am UTC](https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188/5 "2013-07-29T04:29:32Z")

</div>

> 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.
> 
> ```auto
> #include <LiquidCrystal.h>
> 
> ```

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

> ```auto
> 
> ```

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. 🎻

---

<div class="post-metadata">

**Author:** ![jremington](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jremington/32/6595_2.png) [@jremington](https://community.sparkfun.com/u/jremington)\
**Post date:** [July 29, 2013, 4:52am UTC](https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188/6 "2013-07-29T04:52:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![BobDiaz](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@BobDiaz](https://community.sparkfun.com/u/BobDiaz)\
**Post date:** [July 29, 2013, 5:57am UTC](https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188/7 "2013-07-29T05:57:40Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![jremington](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jremington/32/6595_2.png) [@jremington](https://community.sparkfun.com/u/jremington)\
**Post date:** [July 29, 2013, 3:54pm UTC](https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188/8 "2013-07-29T15:54:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BobDiaz](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@BobDiaz](https://community.sparkfun.com/u/BobDiaz)\
**Post date:** [July 30, 2013, 4:26am UTC](https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188/9 "2013-07-30T04:26:56Z")

</div>

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

Bob Diaz

---

<div class="post-metadata">

**Author:** ![BobDiaz](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@BobDiaz](https://community.sparkfun.com/u/BobDiaz)\
**Post date:** [July 31, 2013, 11:00pm UTC](https://community.sparkfun.com/t/crud-lcd-shield-doesnt-work/27188/10 "2013-07-31T23:00:46Z")

</div>

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 😉

{

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 ;

}

}
