Why my lcd is only blue?

I have a lcd from Arduino Starter Kit.
But i connected it all correctly.
And when i run my code a blue screen and nothing other will appear.
On my lcd back it sayed TC1602A-21T
Can someone help me?
Here's my code:

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

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 8, en =  9, d4 = 4, d5 = 5, d6 = 6, d7 = 7;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis() / 1000);
}

Does the LCD have a potentiometer on it to control the brightness ?

Your pictures are too dark and blurred for us to check your wiring.

The HD44780? Library will tell you if you are initialising properly. It is also the best LCD library. Assuming all is well, turn the contrast control until the black blocks appear and then back it off again so that they just fade out.

I can't see if pin 5 (RW) of the LCD is tied to ground. The photos are, as mentioned, too dark.

Have you tried adjusting the contrast potentiometer?

The code works fine. I tested it with an Uno and 16x2 LCD. The problem seems to be with wiring or contrast adjustment.

AJLElectronics:
The HD44780? Library will tell you if you are initialising properly. It is also the best LCD library. Assuming all is well, turn the contrast control until the black blocks appear and then back it off again so that they just fade out.

The hd44780 library hd44780_I2Cexp i/o class includes a diagnostic sketch for LCDs connected with a i2c based backpack.
There currently is no similar sketch for LCDs controlled directly with Arduino pins.

When using direct pin control with no R/W pin, there is no feedback from the LCD as all the arduino pins connected to the LCD are output only.

I have considered doing a diagnostic sketch for LCDs with direct Arduino pin i/o control, but today it does not exist.
In order to do it would require hooking up an Arduino pin to the LCD R/W pin.

--- bill

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.

What does the display do if you adjust the contrast pot that you have fitted next to it?

Tom.... :slight_smile: