LCD2004 Help

First off, I'd recommend you download and install the New Liquid Crystal Library, to replace the default one that comes with your IDE installation.

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

Make sure you remove the existing standard LiquidCrystal and LiquidCrystal_I2C libraries. Don't just rename them, you have to remove them from the 'libraries' folder completely or there will be a conflict.

The Sainsmart example code seems to suggest that their I2C backpack is wired in the 'standard' way for the I2C library, but there is an obvious mistake in the page telling you that the interface is on 0x3F, but the example code is for 0x27.

Try the code below, but if it doesn't work with the 0x3F address then try running the I2C Scanner sketch from the Arduino Playground, and it will report the addresses it finds. The replace 0x3F against lcdAddrin the example below with the address you find.

Connect as follows

LCD Backpack > Arduino
Vcc          > +5V, via a 100 Ohm resistor
Gnd          > Gnd
SCL          > Pin A5
SCK          > Pin A4

The resistor is there to protect the LED backlight. I would guess the LCD module has a resistor anyway, so if the display backlight is dim then you can probably remove this resistor afterwwards and wire Vcc directly to +5V

Once you've done all the above then use the sketch below and compile + upload. Report back whether this has you up and running.

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

#define lcdAddr 0x3F // set the address of the I2C device the LCD is connected to

// create an lcd instance
LiquidCrystal_I2C lcd(lcdAdrr); // I2C addr

// Creat a set of new characters
const uint8_t charBitmap[][8] = {
   { 0xc, 0x12, 0x12, 0xc, 0, 0, 0, 0 },
   { 0x6, 0x9, 0x9, 0x6, 0, 0, 0, 0 },
   { 0x0, 0x6, 0x9, 0x9, 0x6, 0, 0, 0x0 },
   { 0x0, 0xc, 0x12, 0x12, 0xc, 0, 0, 0x0 },
   { 0x0, 0x0, 0xc, 0x12, 0x12, 0xc, 0, 0x0 },
   { 0x0, 0x0, 0x6, 0x9, 0x9, 0x6, 0, 0x0 },
   { 0x0, 0x0, 0x0, 0x6, 0x9, 0x9, 0x6, 0x0 },
   { 0x0, 0x0, 0x0, 0xc, 0x12, 0x12, 0xc, 0x0 }
   
};

void setup()
{
   int charBitmapSize = (sizeof(charBitmap ) / sizeof (charBitmap[0]));

  lcd.begin(20,4);  // initialize the lcd as 20x4 (16,2 for 16x2)
  
  lcd.setBacklight(1); // switch on the backlight

  for ( int i = 0; i < charBitmapSize; i++ )
   {
      lcd.createChar ( i, (uint8_t *)charBitmap[i] );
   }

  lcd.home ();  // go home to character 0 on line 0 (1st line)
  lcd.print("Hello, ARDUINO ");  
  lcd.setCursor(0,1);  // character 0 on line 1 (2nd line)
  lcd.print (" FORUM - fm   ");
  lcd.setCursor(0,2); // character 0 on line 2 (3rd line)
  lcd.print("This is line 3");
  lcd.setCursor(0,3); // character 0 on line 3 (4th line)
  lcd.print("This is line 3");
  delay(1000);
}

void loop()
{
   lcd.clear();
   lcd.home ();
   // Do a little animation by writing to the same location
   for ( int i = 0; i < 2; i++ )
   {
      for ( int j = 0; j < 16; j++ )
      {
         lcd.print (char(random(7)));
      }
      lcd.setCursor ( 0, 1 );
   }
   delay (200);
}