I am able to run the basic example "hello world" sketch on my Sainsmart 20X4 lcd
When I connect the 16X2 from banggood and adjust the address, I see nothing on the display. I have tried 2 displays and get the same results with both.
It will definitely be helpful to see the code you're running.
Assuming your wiring is ok, it might be the way you're initialising the display.
I have a template sketch for my generic ebay i2c backpack + 16x2 display that I use every time and it works so will post the code this evening for comparison.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
// initialize the LCD
lcd.begin();
// Turn on the blacklight and print a message.
lcd.backlight();
lcd.print("Hello, world!");
}
void loop()
{
// Do nothing here...
}
donek:
Any time I try a sketch with:
LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7);
or similar, I get the error:
"no matching function for call 'LiquidCrystal_IC2:: LiquidCrystal_I2C(int,int,int,int,int,int,int,int)'
I must have an outdated library. Do you have a link to the one you are using?
I'm not sure what version it is, but could be that mine's the outdated one!
Also not sure what the other arguments are.
I've zipped and uploaded the library im using
It would be better if you try the 3 arguments first that JSinAZ is describing, then try my lib.
You are getting errors because the the object is not expecting all those arguments being passed
This is the exact code I am using. Adding the wire.begin has no effect.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
// initialize the LCD
lcd.begin();
// Turn on the blacklight and print a message.
lcd.backlight();
lcd.print("Hello, world!");
}
void loop()
{
// Do nothing here...
}
I have turned the contrast pot and now see the blocks for each character. When I upload the following coded there are little flashing pixels in the middle character block. It is obviously sending something, but it's not quite right.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
// initialize the LCD
lcd.begin();
Wire.begin();
// Turn on the blacklight and print a message.
lcd.backlight();
lcd.print("Hello, world!");
}
void loop()
{
lcd.print("Hello, world!");
}