lcd keypad shield

i am trying to connect my lcd keypad shield to my arduino, with jumoper wires

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.setCursor(0,0);
  lcd.print("LCD Key Shield");
  lcd.setCursor(0,1);
  lcd.print("Press Key:");
}

void loop() {
  int x;
  x = analogRead (0);
  lcd.setCursor(10,1);
  if (x < 60) {
    lcd.print ("Right ");
  }
  else if (x < 200) {
    lcd.print ("Up    ");
  }
  else if (x < 400){
    lcd.print ("Down  ");
  }
  else if (x < 600){
    lcd.print ("Left  ");
  }
  else if (x < 800){
    lcd.print ("Select");
  }
}

i connect 4,5,6,7,8,9 from digital pins on the lcd to the digital pins from the arduino, and connected ground
with this code i am trying to get some text on the screen, but its blank.
If i put the lcd directly on the arduino its working ok.
WHat am i doing wrong?

Hello,

You have to connect :

+5V to pin 2
Ground to pin 3 (V0) or through a 2k resistor to adjust contrast
Ground to pin 5 (R/W)
+5V to pin 15 through a 220 ohms
Ground to pin 16

Hope this helps.
Regards

its not just an lcd
Its this one:

I understand.
The pins (8,9,4,5,6,7 + GND) are not enough.
Try to connect at least +5V
G

sandoz:
i connect 4,5,6,7,8,9 from digital pins on the lcd to the digital pins from the arduino, and connected ground
with this code i am trying to get some text on the screen, but its blank.
If i put the lcd directly on the arduino its working ok.
WHat am i doing wrong?

The shield needs power and your sketch wants to use analog pin 0 so those pins (5v & A0) need to be hooked up as well.
Also there is more than one ground on the Arduino headers so I'd recommend hooking them both up.

--- bill

If you haven't already, you should have a read about a design flaw in certain LCD keypad shields.
It is a sticky in the displays section of the forum: Warning to users of some vendors LCD keypad shields - Displays - Arduino Forum

At least read the first post which provides links to a test sketch to test the lcd keypad for the h/w issue and an alternate library (hd44780) that can work around the issue in s/w.

--- bill

ok , i will read that

ok, with 5v i see the text
On the lcd i should be able to select settings from a small menu:

When i have the shied directly on the arduino it works ok, when i connect it with jumper wires, +5v, gnd, pin 4,5,6,7,8,9 and a0 it randomly goes through the buttons.
What could cause that?

this is the code
https://raw.githubusercontent.com/triyanwn/arduinostuff/master/arduino-timer-relay.ino
code is to large to post here