I have an arduino uno and pin connection for I2C are -

SDA --> A4
SCL --> A5 
VCC --> 5v

This the code i am uploading taken from the examples -

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()
    // initialize the LCD

    // Turn on the blacklight and print a message.
    lcd.print("Hello, world!");

void loop()
    // Do nothing here...

The LCD shows nothing after upload . I have tried adjusting the potentiometer on I2C; just the blank characters come up.

  • This looks correct. You could try lcd.setCursor(0, 0) before the print. Is the backlight coming on as expected? – Christian Lindig Mar 16 at 10:33
  • 2
    There is also a chance that the display is having a different address than0x27; see this answer: arduino.stackexchange.com/a/28508/53450 – Christian Lindig Mar 16 at 11:27
  • Running the I2C scanner sketch (playground.arduino.cc/Main/I2cScanner) would be the first thing to do to check if the I2C is detected on the bus and with which address. – Maximilian Gerhardt Mar 16 at 11:50
  • Use the I2C scanner sketch to verify the I2C address of the display. I also have a non-standard LCD that has different pin mappings between the I2C module and the LCD itself, and I had to use a version of the LiquidCrystal_I2C constructor that let me specify the pin assignments. – Duncan C Mar 16 at 11:56
  • Thank you all i found the problem, some of the pins were not properly soldered and had to use LiquidCrystal_I2C lcd(0x27, 20, 4) – Rohan Mar 16 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.