Arduino Uno LCD Problem

Hello everyone!

I’m trying to connect a LCD 1602 I2C to a Arduino Uno and display the message “hello, world!” but i couldn’t make the LCD display anything. I’ve tried like 4-5 tutorials, have the exact same hardware, same pin connections, same code. The LCD turns on but it display’s nothing.

Pins conected:
GND → GND Arduino
VCC → 5V
SDA → A4
SCL → A5

Code used:

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

LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

void setup ()
  lcd.print("hello, world!");

void loop ()

I tried with another LCD Display 1602 I2C and the same problem. Even changed the Arduino Uno with a Arduino Duemilanove and still nothing. I’ve been using a adress scanner for LCD to find out what adress it has. Code below:

#include <Wire.h>
void setup()
  while (!Serial);             // Leonardo: wait for serial monitor
  Serial.println("\nI2C Scanner");
void loop()
  byte error, address;
  int nDevices;
  nDevices = 0;
  for(address = 1; address < 127; address++ )
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    error = Wire.endTransmission();
    if (error == 0)
      Serial.print("I2C device found at address 0x");
      if (address<16)
      Serial.println("  !");
    else if (error==4)
      Serial.print("Unknown error at address 0x");
      if (address<16)
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  delay(5000);           // wait 5 seconds for next scan

This showed me the adress was 0x3F and i changed the original code with “hello, world!”, at the adress with 0x3F. I updated the software, included the library but still no luck. I want to know what i’m doing wrong and what might be the problem and solution. Thanks a lot!


The hd44780 library will autodetect the I2C expander chip to LCD wiring. No need to figure out the right constructor. Use the hd44780_I2Cexp class.

if the LCD is powered on, you need to ADJUST the display’s potentiometer. I encountered the same problem I think. And it turned out there was nothing wrong. Just that…

Absolutely amasing, after just turning a little bit the potentiometer on the back, the LCD at finaly turned on and show "hello world!" Thank you for the support! :slight_smile: