LCD printing blocks

arduinolcdsolderingwire

Over the last couple days I have attempted to get my LCD to print "hello world". However for some reason not matter what code I upload from the liquid crystal examples on the Arduino program, it always prints blocks (shown below):
enter image description here

It has been an incredibly frustrating process, I checked that I have soldered all header pins properly and re-wired several times but I still get the same outcome. I have read on some websites that this is a problem due to my LCD being uninitialized. If this is the case, how do I initialize it?

Below are some photos of my LCD:
enter image description here
enter image description here

Best Answer

This appears to be the same module and may even be the tutorial you are following.

That tutorial gives sample code for writing to the LCD.

What you see on the LCD is what the tutorial shows happening when there's no communication with the Arduino.

Either your code is not correct (compare with code sample in the link given above) or the serial signals aren't getting to the LCD. Check your code, then double check the connections between the UNO and the LCD Module.

//code sample from http://www.dreamdealer.nl/tutorials/connecting_a_1602a_lcd_display_and_a_light_sensor_to_arduino_uno.html   
        #include <LiquidCrystal.h>

        LiquidCrystal lcd(7, 8, 9, 10, 11 , 12);

        void setup() {
          lcd.begin(16, 2);
          lcd.setCursor(0,1);
          lcd.write("LIGHT: ");
        }

        void loop() { }