1602 IC2 LCD on UNO

Hi all,

There are many more questions about this LCD, but for some reason I can't seem to find the answer.

Used this ref for installation: [SOLVED] I2C LCD - Setup instructions for 16x2 - Displays - Arduino Forum

Lib used: https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads

SDA=A4 and SCL=A5. The two power leads to the 5V and GND terminals.

My code:

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

#define I2C_ADDR    0x3F  // Define I2C Address where the PCF8574A is
#define BACKLIGHT_PIN     3
#define En_pin  2
#define Rw_pin  1
#define Rs_pin  0
#define D4_pin  4
#define D5_pin  5
#define D6_pin  6
#define D7_pin  7

int n = 1;

LiquidCrystal_I2C  lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup()
{
  Serial.begin(115200);
  lcd.begin (20,4);
  
// Switch on the backlight
  lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
  lcd.setBacklight(HIGH);
  lcd.home ();                   // go home

  lcd.print("SainSmart I2C tester");  
  lcd.setCursor ( 0, 1 );        // go to the 2nd line
  lcd.print("F Malpartida library");
  lcd.setCursor ( 0, 2 );        // go to the third line
  lcd.print("Test & demonstration");
  lcd.setCursor ( 0, 3 );        // go to the fourth line
  lcd.print("Iteration No: ");
}

void loop()
{
  // Backlight on/off every 3 seconds
  lcd.setCursor (14,3);        // go col 14 of line 3
  lcd.print(n++,DEC);
  lcd.setBacklight(LOW);      // Backlight off
  delay(3000);
  lcd.setBacklight(HIGH);     // Backlight on
  delay(3000);
}

The device is flashing every 3 seconds, but nothing is displayed.

Setup pictures:

You have not mentioned which I2C adapter you are using and how you came up with the pin designations that you have specified.

You really should use the LCD guesser sketch referenced in the link you already posted (reply #59+) to determine the appropriate pin designations.

Don

And post proper pictures.

Must always be perfectly focussed.

Yours are simply too dim to be meaningful. OK to have the thing running, but take it out in bright daylight (but not in the sun) to take them. Use a decent camera at least 1.2 m away with actual zoom to limit it to the object.