i2c lcd problems :C

Ugh these lcds both i2c and not have been such a headache for me…

ok

//DFRobot.com
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
 
LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display
 
void setup()
{
  lcd.init();                      // initialize the lcd 
  
  // Print a message to the LCD.
  lcd.backlight();
  lcd.print("Hello, world!");
}
 
void loop()
{
}

exact model of screen

guide i followed

i realize the 2 r slightly different but it should work as they pin up the same.
backlight is on and i adjusted the contrast i can see white boxes only or nothing with contrast down.

HELP ME PLZ!

I think there are several different libraries for the I2C LCD display. I've always used the display referenced here:

http://arduino-info.wikispaces.com/LCD-Blue-I2C#v1

and it mentions the library to use. However, that library has a considerably different constructor call for the display than the one you use even though the library names are the same:

  • LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address*

I don't know if this will be of help or not.

web page says the lcd address is 0x3F your code says the address is 0x27

there is a test program that checks all the i2c addresses and tells you the correct address to use.

Try 0x38 Or 0x3F what they say on the the link posted but most 16 2 LCD use 0x38 not 0x27
and you know you need to pullup the SDA and SDC lines with 10 k resistors.
I played with this all day last weekend and my whole problem was I forgot the pullups on the SDA and SDC lines.

Depends on the Arduino.
A Mega has 10k resistors on the I2C lines, and Uno not.
Check which pins to use for I2C for the Arduino you have.
Leo..

Ok but if he checks that's one thing he knows for sure is right.
But I read maybe 20 pages and not one said anything about the 10 k pullups and I found a sch and it showed them for uno. I even know it needed them but I hooked it up as drawn on the library I used no pull ups and then i said this needs pull ups and A4 A5 are the pins I need dang It works LOL

I'll check first OP should too
If it's this LCD then none needed

I use Terry King's display (Yourduino.com) and the I2C doesn't use pullups with RoboRed, an Uno clone.

thanks for all the help so far no resolution. using a leonardo, i take it that means i need the pullups

Can you post a real good picture of the back side of the LCD the Leonardo may use different pins have to look and see if SDA and the SDC are in the same place.

SDA is on pin 3 SDC clock is on pin 4 there not the same

as in analog 3 and 4?
instead of 4 and 5

On the sch its the 3 and 4 next to the tx and rx pins is how its drawed

be80be:
On the sch its the 3 and 4 next to the tx and rx pins is how its drawed

come again sch ? and what r u implying im supposed to do

On the side where the tx and rx are not the analog side ..tx and rx is pin one and two you use the next two pins 3 and 4
Pin 3 is data and pin 4 is clock

and how did u come to this conclusion can u tell me about it

The mega is SDA on pin 20 and SCL on pin 21.
Arduino Leonardo should have them marked if it's a real Arduino Leonardo But there on pin 3 SDA and pin 4 SCL and On the same side at he end of the second header there there also look at the schematic.

its a real leonardo, and i tried the scl/sdas pins and those didnt pan out.

econjack:
I use Terry King's display (Yourduino.com) and the I2C doesn't use pullups with RoboRed, an Uno clone.

Some end devices have built in pullups. It is best to assume that they are not there
unless they can be seen.
Dwight

so do you think the scl/sda lines on arduino leonardo need 10k pullups

If not supplied by the remote device then yes, they will be needed.
It won't hurt to always add another 10K, it is only 500ua with a 5V source.
Dwight