Upload problem with Mega 2560
You will have to look at the schematic for your Arduino to figure out the correct pins. It's likely these pins are defined in the sketches, so then you will need to change the defines according to your pinout.
You will be looking for a header file containing stuff like:  

#define LCD_RS Digital_Pin_12  
#define LCD_E  Digital_Pin_11  


Change the Digital_Pin_x to whatever LCD_X is connected to on your Arduino, for instance if LCD_RS is connected to pin 5 then the above will be  #define LCD_RS Digital_Pin_5. I don't use Arduino so I don't know the exact naming conventions (Digital_pin_x is just a guess), but it's likely it will be something like this. If you post your code and Arduino schematic it should be simple to figure the exact changes required.