I2C not working

hi
i have a uno v1 with a sensor sheild v4 connected to a ywrobot I2C lcd 16,2
and can't get this simple program to display

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

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

#define BACKLIGHT_PIN 13

void setup()
{

// Switch on the backlight
pinMode ( BACKLIGHT_PIN, OUTPUT );
digitalWrite ( BACKLIGHT_PIN, HIGH );

lcd.begin(16,2); // initialize the lcd

lcd.home (); // go home
lcd.print("Hello, ARDUINO ");
lcd.setCursor ( 0, 1 ); // go to the next line
lcd.print (" WORLD! ");

}

void loop()
{

}

can anybody see what i am doing wrong?

i also tried a sainsmart 20,4 lcd with no results

devobitch

Try this,

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

LiquidCrystal_I2C lcd(0x20,16,2);  // set the LCD address to 0x20 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()
{
}

hi

i get a error on this line

LiquidCrystal_I2C lcd(0x20,16,2);

error invalid conversion from 'int' to 't_backlightPoll'

Where did you get your library from?

Try this one.
http://www.ebay.com/itm/New-Blue-IIC-I2C-TWI-2004-20x4-Serial-LCD-Module-Display-Arduino-compatible-/160964424512?pt=LH_DefaultDomain_0&hash=item257a3a3340

hi

i get the same error

devobitch

Did you delete your LiquidCrystal_I2C library and install the new one? What IDE are you using, 1.0.3, and where did you put it?

hi
i renamed the old library and put the 2004LiquidCrystal_I2C.rar (unrared) in the
library fold and renamed it to LiquidCrystall_I2C

i tried the example in the example folder and got the same error
i am useing arduino 1.03 and tried arduino-0023

devobitch

Renaming the old folder is not going to solve the problem, you need to get rid of it entirely, move it to your recycling bin.

If needed ill give you my library, but I will need your email address. Send it to me in a personal message.

hi

ok deleted the folders
now i get this

error compiling

In file included from HelloWorld.pde:3:
C:\arduino-1.0.3\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:81: error: conflicting return type specified for 'virtual void LiquidCrystal_I2C::write(uint8_t)'
C:\arduino-1.0.3\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

heres my email mark_robare@charter.net

thanks

ok deleted the folders
now i get this

error compiling

In file included from HelloWorld.pde:3:
C:\arduino-1.0.3\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:81: error: conflicting return type specified for 'virtual void LiquidCrystal_I2C::write(uint8_t)'
C:\arduino-1.0.3\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

You have several issues. First, user downloaded libraries do NOT go in the core library folder. Doing that causes all kinds of issues.

The pde extension is for pre-1.0 versions of the IDE. You appear to be using one with post-1.0. Why?

hi

"You have several issues. First, user downloaded libraries do NOT go in the core library folder. Doing that causes all kinds of issues.

The pde extension is for pre-1.0 versions of the IDE. You appear to be using one with post-1.0. Why?"

ok i read that was where i should put them and i was trying with both 1.03 and 0023
and have same problems
so where should LiquidCrystall_I2C go?
should i redownload arduino 1.03 and start over?

thanks

devobitch

ok i read that was where i should put them

Where did you read that? Wherever it was, it is wrong.

In the folder where you store your sketches (C:\Users\PaulS\Documents\Arduino in my case) there is a libraries folder. That is where user downloaded libraries go. If there is not a libraries folder, create one.

so where should LiquidCrystall_I2C go?

See above.

should i redownload arduino 1.03 and start over?

No. Just delete any user-downloaded libraries you have added to the core library folder.

hi
ok i did what you said and used 0023 and it worked thanks
know where i can get a 1.03 liquidcrystall_I2C library?

so should i ever put anything in the arduino folder or always use the arduino folder in the documents folder?

thanks again

so should i ever put anything in the arduino folder or always use the arduino folder in the documents folder?

It's easier to understand and answer this question if you follow the Arduino installation guidelines, and use Arduino as the name of the sketch folder, and arduino-xxxx as the name of the version-specific installation directory for the Arduino code.

Then, the question is "so, should I ever put anything in the arduino-xxxx folder...", and the answer is generally no. There are exceptions, as always, but when they arise, you'll know it, you'll know enough to know that it is an exception, and you will be confident enough to do it (and to deal with the situation when you screw things up). For instance, if you are creating a new arduino-ish board, you need to add stuff to the core folder to make that board known to the IDE. Are you likely to do that as a newbie? Not hardly. By the time that you feel that none of the existing Arduino boards exactly fit your needs, you'll know what to add, where, to safely modify the installation.

or always use the arduino folder in the documents folder?

is almost always a better idea.