i2c lcd(2x16) +costume keypad when I try to add new row the LCD doesn't work

-I am using adruino IDE 1.0.5-r2
-also using arduino LEONARDO
-i2c LCD LCM1602

when I run the 1#code code every thing run smoothly, but when I run the 2#code code nothing when I press any button nothing happens in the serial monitor or the LCD display
all I did in the 2#code added extra row

I use the LCD library from that link (the only library that worked with me)

1#code

 const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
  {'0','1','2','3'},
  {'4','5','6','7'},
  {'8','9','A','B'},
  {'C','D','E','F'}
};
byte rowPins[ROWS] = {11,10,9,8};//connect to the row pinouts of the keypad
byte colPins[COLS] = {7,6,5,4}; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); 

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

void setup(){
  Serial.begin(9600);

  lcd.begin(16,2);
  lcd.backlight();
  lcd.setCursor(3,0);
  lcd.print("You Pressed:");
}
  
void loop(){
  char customKey = customKeypad.getKey();
  
  if (customKey){
    Serial.println(customKey);
      if (int(customKey) != 0) {
    lcd.setCursor(1,0);
    lcd.print(customKey);
  }
  }
}

2#code

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#include <Keypad.h>
const byte ROWS = 5;  //  <====== all i did is added an extra row her
const byte COLS = 4;

char hexaKeys[ROWS][COLS] = {
 {'0','1','2','3'},
 {'4','5','6','7'},
 {'8','9','A','B'},
 {'C','D','E','F'},
 {'G','H','I','J'}
}; // the extra row is {'G','H','I','J'}

byte rowPins[ROWS] = {12,11,10,9,8}; // added and extra pin 
byte colPins[COLS] = {7,6,5,4};

//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); 

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

void setup(){
 Serial.begin(9600);

 lcd.begin(16,2);
 lcd.backlight();
 lcd.setCursor(3,0);
 lcd.print("You Pressed:");
}
 
void loop(){
 char customKey = customKeypad.getKey();
 
 if (customKey){
   Serial.println(customKey);
     if (int(customKey) != 0) {
   lcd.setCursor(1,0);
   lcd.print(customKey);
 }
 }
}

20141029_233242[1].gif

Apparently you have made some changes between the first program and the second program.

I can't fit all of your code on my screen at the same time so I can't easily tell what you changed.

Please go back and comment your program(s) so that the changes can easily be found.

Don

the arduino and the program works normally with the extra row if I didn't include the LCD library and its functions

I added the comments I used custom keypad, what I did extra that I wanted to add an extra row which led to modify three lines only
1-//const byte ROWS = 5;
2-//char hexaKeys[ROWS][COLS] = {
{'0','1','2','3'},
{'4','5','6','7'},
{'8','9','A','B'},
{'C','D','E','F'},
{'G','H','I','J'}
};
3-//byte rowPins[ROWS] = {12,11,10,9,8};

so anybody code help me ?

I don't know where was the error but it worked when I put the below code to be the first line after including the libraries .

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