i2c backpack LCD

I am running Arduino IDE version 1.6.4 trying to hook up a 2x16 Sainsmart LCD and backpack. So far, I can't find a code example that will compile. I have downloaded several versions of the LiquidCrystal_i2c library (or at least from different sources) and when I try to compile the example code supplied with the library, it throws an error. The lastest one is ...

HelloWorld_i2c:8: error: no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int)'
HelloWorld_i2c.pde:8:27: note: candidates are:
In file included from HelloWorld_i2c.pde:2:0:
C:\Users\misadmin\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:58:3: note: LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, uint8_t)
   LiquidCrystal_I2C(uint8_t lcd_Addr,uint8_t lcd_cols,uint8_t lcd_rows);
   ^
C:\Users\misadmin\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:58:3: note:   candidate expects 3 arguments, 1 provided
C:\Users\misadmin\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:56:7: note: LiquidCrystal_I2C::LiquidCrystal_I2C(const LiquidCrystal_I2C&)
 class LiquidCrystal_I2C : public Print {
       ^
C:\Users\misadmin\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:56:7: note:   no known conversion for argument 1 from 'int' to 'const LiquidCrystal_I2C&'
Multiple libraries were found for "LiquidCrystal_I2C.h"
 Used: C:\Users\misadmin\Documents\Arduino\libraries\LiquidCrystal_I2C
 Not used: C:\Users\misadmin\Documents\Arduino\libraries\LiquidCrystal
 Not used: C:\Program Files\Arduino\libraries\LiquidCrystal_I2C
no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int)'

The example code I am trying to compile is ...

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



#define BACKLIGHT_PIN     13

LiquidCrystal_I2C lcd(0x38);  // Set the LCD I2C address

//LiquidCrystal_I2C lcd(0x38, BACKLIGHT_PIN, POSITIVE);  // Set the LCD I2C address


// 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]));

  // Switch on the backlight
  pinMode ( BACKLIGHT_PIN, OUTPUT );
  digitalWrite ( BACKLIGHT_PIN, HIGH );
  
  lcd.begin(16,2);               // initialize the lcd 

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

  lcd.home ();                   // go home
  lcd.print("Hello, ARDUINO ");  
  lcd.setCursor ( 0, 1 );        // go to the next line
  lcd.print (" FORUM - fm   ");
  delay ( 1000 );
}

void loop()
{
   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);
}

I guess I am not smart enough to figure out what is going on here. Can someone direct me to a library and/or code that will work with an LCD 2x16 with a back pack?

Have you tried putting your forum title "i2c backpack LCD" into the search box at the upper right of the page?

You will find that you need a library written by fm and a 'guesser' sketch written by bperrybap to get your LCD running.

Don't try to do anything fancy until you can display a simple message in setup() with nothing at all in loop().

Don

Yes, that is exactly what I did and when I tried one of the most recent fmalpartida examples, I got the error shown above. I am not clear on what you mean by a "guesser" sketch, though. None of the examples from the site you specify would compile. I followed his instructions fro the web site exactly as far a I can tell. The code above is one of his examples, but even when I strip everything out of his code except the #includes and the LCD object initialization, it throws the error. It does not find the LiquidCrystal_I2C class

Have you removed the original "LiquidCrystal_I2C" library as required when you added the fmalpartida one?

Yes. I renamed to an obscure name, and when that didn't work, I removed them entirely. Now the only library related to the LiquidCrystal is the one that I downloaded from fmalpartida's bitbucket site.

Stil won't compile.

I am not clear on what you mean by a "guesser" sketch, though.

To get the I2C guesser by bperrybap follow this link --> [SOLVED] MJKDZ brand I2C Controller working with 1602 LCD - Displays - Arduino Forum

Don

crchisholm:
Yes. I renamed to an obscure name, and when that didn't work, I removed them entirely. Now the only library related to the LiquidCrystal is the one that I downloaded from fmalpartida's bitbucket site.

Stil won't compile.

I have been successful by going to the 'regular' Arduino libraries folder and renaming the default LiquidCrystal library. I then put fm's library in with the 'additional' Arduino libraries ("My Documents\Arduino\libraries").

In spite of my success you are probably better off following the recommendations to delete the default library.

Don

I think that is the way I am set up now, but will have to review it tomorrow. Maybe I am missing something. I think I have no LiquidCrystal libraries in the main library folder and only the fmalpartida one in the supplemental one.

I will also check out guesser.

I had a hard time with a I2c and 20 x4 display first I used the library the vendor provided, second I ran a LCD I2c finder code, MultiSpeed I2C Scanner - 50,100,200,400 KHz. - Libraries - Arduino Forum which will give the exact address. With proper library for one wire ,lcd library and address . Mine fired up and now I am about 80% there to tx and rx the display through the arduino.It works for me. a total beginner. This is an example of my included menu

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F,27,4); // set the LCD address

I have not abandoned this thread..only diverted by another project that has a more urgent deadline.