Please post the sketch you're using to test the library. Is it HelloWorld_i2c? Post the wiring diagram or a sharp photo of your setup where all wires are visible. What kind of Arduino are you using?
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define BACKLIGHT_PIN 13
LiquidCrystal_I2C lcd(0x20); // Set the LCD I2C address
void setup()
{
// Switch on the backlight
pinMode ( BACKLIGHT_PIN, OUTPUT );
digitalWrite ( BACKLIGHT_PIN, HIGH );
lcd.begin(16,4); // initialize the lcd
lcd.home (); // go home
lcd.print("Hello, ARDUINO ");
lcd.setCursor ( 0, 1 ); // go to the next line
lcd.print (" FORUM - fm ");
}
void loop()
{
}
LiquidCrystal_I2C lcd(0x20); // Set the LCD I2C address
Why did you choose the address 0x20? Most of these devices use 0x27 or 0x3F. Did you cut the address bridges on the PCB? Have you tried an I2C scanner?
In this case it doesn't look like any of the standard devices. On the page you linked I cannot find a datasheet or manual. You should never buy stuff from a supplier that doesn't provide datasheets.
Are you able to get the a photo of the other side of the smaller PCB, so we might find out what chips are mounted there? The library you're using is built for an I2C IO expander module that then drives the 4bit LCD interface. Because your module also offers an SPI interface it probably is controlled by a microprocessor and may speak a higher level "protocol".
In this web you can find the Library and the schematic.
I have tested it, but the display not work properly.
/*
Demonstration sketch for Adafruit i2c/SPI LCD backpack
using MCP23008 I2C expander
( http://www.ladyada.net/products/i2cspilcdbackpack/index.html )
This sketch prints "Hello World!" to the LCD
and shows the time.
The circuit:
* 5V to Arduino 5V pin
* GND to Arduino GND pin
* CLK to Analog #5
* DAT to Analog #4
*/
// include the library code:
#include <Wire.h>
#include <LiquidCrystal.h>
// Connect via i2c, default address #0 (A0-A2 not jumpered)
LiquidCrystal lcd(0);
void setup() {
// set up the LCD's number of rows and columns:
lcd.begin(16, 4);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
lcd.setBacklight(HIGH);
delay(500);
lcd.setBacklight(LOW);
delay(500);
}
I would try to modify the library and check the return value of Wire.endTransmission() and Wire.requestFrom(). If they are 0 there was an I2C error (NAK received in most cases) and you know that you have to look for hardware errors.