Hi,
I have an issue with the usage of LiquidCrystal.h and Wire.h in the same sketch:
This is the minimal sketch to reproduce the error:
The issue is: as soon as I uncomment the line with the code Wire.begin() my LCD is totally corrupted (both lines).
If this line is commented everything is fine and the LCD displays all characters in both lines perfectly.
I work under Arduino 1.0.1 and I use the libraries LiquidCrystal.h and Wire.h from this installation.
The sketch is here:
#include "Wire.h"
// include the LCD library code
#include "LiquidCrystal.h"
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// as soon as I uncomment the next line my LCD gets corrupted
// Wire.begin();
}
void loop() {
// Print a message to the LCD.
lcd.setCursor(0, 0);
lcd.print("LCD Test");
lcd.setCursor(0, 1);
lcd.print("ax=");
// delay
delay(500); // wait for 500ms
}
Any idea how to fix this ?
Thanks in advance.