Hello,
I've bought a LiquidCrystal_I2C last month but I not able to make it work.
All I've it's black boxes on screen or crazy characters like this:
http://www.hostingpics.net/viewer.php?id=85535320151222131005.jpg
The scan to know the address give me: 0x27.
The wire on the I2C to know the pin give me this: (0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE). Furthermore, another buyer of this screen found the same wired than me, so I can suppose that I'ts ok.
The wire between the I2C and the arduino is good.
The chip on the I2C is a Philips PCF8574P.
The liquidCrystal is a 2004A.
Before posting here, I read and tryed several solutions but no one worked.
Libraries that I tryed:
_ LiquidCrystal_I2C
_ LiquidCrystal_I2C2004V1
_ LiquidCrystal_I2C2004V1_Chinese
_ LiquidCrystal_V1.2.1
_ NewliquidCrystal_1.3.4
Old topic that I read (incluing all the topics linked in each topic):
http://forum.arduino.cc/index.php?topic=157817.0
http://forum.arduino.cc/index.php?topic=248348.0
Using this sketch I just have the light of the display clipping but nothing on it, so it seen to be working without text.
/*
** Example Arduino sketch for SainSmart I2C LCD Screen 16x2
** based on https://bitbucket.org/celem/sainsmart-i2c-lcd/src/3adf8e0d2443/sainlcdtest.ino
** by
** Edward Comer
** LICENSE: GNU General Public License, version 3 (GPL-3.0)
** This example uses F Malpartida's NewLiquidCrystal library. Obtain from:
** https://bitbucket.org/fmalpartida/new-liquidcrystal
** Modified - Ian Brennan ianbren at hotmail.com 23-10-2012 to support Tutorial posted to Arduino.cc
** Written for and tested with Arduino 1.0
**
** NOTE: Tested on Arduino Uno whose I2C pins are A4==SDA, A5==SCL
*/
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#define I2C_ADDR 0x27 // <<----- Add your address here. Find it from I2C Scanner
#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()
{
lcd.begin (20,4); // <<----- My LCD was 20x4
// Switch on the backlight
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
lcd.home (); // go home
lcd.print("SainSmartI2C16x2");
}
void loop()
{
// Backlight on/off every 3 seconds
lcd.setCursor (0,1); // go to start of 2nd line
lcd.print(n++,DEC);
lcd.setBacklight(LOW); // Backlight off
delay(3000);
lcd.setBacklight(HIGH); // Backlight on
delay(3000);
}
I'm new in this so maybe that I'm not doing something as it should.
The other solution is that the I2C is bugged, but before buying another one I would like to check if I'm not the problem by missing a basic thing.
Thank you.