'Arduino LCD Not displaying?

So I just wanted to mess around with my arduino LCD display (May I add it came with the kit from arduino...)

Basically all the wiring is fine, and is done as the diagram shows in the book. The back lighting is working fine and the display is definitely on.

The problem is that it will not display text no matter what, even after I unplug, re-upload the code etc.

Here is my code:(the pins are all correct 100%)

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int switchPin = 6;
void setup(){
  pinMode(switchPin,INPUT);
  lcd.begin(16,2);
  lcd.print("Hey!");



}

void loop(){



}


Solution 1:[1]

Try and use the code that is in the book. If your wiring is 100% correct, then check the wires themselves. As in, are they making a secure mechanical and electrical connection with the LCD and with the pins on the Arduino. Try using a breadboard instead of male-to-female jumper wires. Check that the Arduino is working properly. Do this by uploading the 'Blink' example sketch and see if the 'L' LED blinks.

Try and turn the contrast knob attached to pin 3 here and there.

If all else fails, use a different Arduino and/or a different LCD.

Solution 2:[2]

You forgot to set the cursor :P.

lcd.setCursor(0,0) 

sets the cursor to the top left corner

Solution 3:[3]

If your wire connection is ok then you will see 1st row THIS IS TEST and 2nd row ABC

#include <LiquidCrystal.h>    
const int rs = 12, en = 11, d4 = 4, d5 = 5, d6 = 6, d7 = 7;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  lcd.begin(16, 2);
  lcd.print("THIS IS TEST");
}

void loop() {
  lcd.setCursor(0, 1);
  lcd.print("ABC");
}

Solution 4:[4]

Please use 220ohm resistor. If you don't have 220ohm resistor then connect the anode of the LCD to the 3.3v pin of Audriuno

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Wouldn't You Like To Know
Solution 3 Borhan Uddin
Solution 4 Jeevan ebi