Electronic – arduino – Upload problem with Mega 2560

arduinomicrocontroller

I’m new to electronics and I got the SainSmart LCD keypad Arduino shield from Ebay.
I’ve got an Arduino Mega 2560. I have been able to load the “ADC Key Testing” sketch from the seller, nichegeek but, I can’t seem to get any others to work, i.e., Autoscroll, Display, etc. from the example codes that come with the Arduino 1.0 software amp “GuessTheNumber” found elseware without getting a lot of error messages. I loaded “Hello World!” and it compiles amp loads fine according to the Arduino 1.0 but, the shield doesn’t respond or show the message. The LED on my Mega flashes, so I know that it sent. However, while looking the code over, I saw that the pins in the sketch are calling out : LCD RS pin to digital pin 12, LCD Enable pin to digital pin 11, LCD D4 pin to digital pin 5, LCD D5 pin to digital pin 4, LCD D6 pin to digital pin 3, LCD D7 pin to digital pin 2, LCD R/W pin to ground, 10K resistor: ends to +5V and ground, wiper to LCD VO pin (pin 3), which are different than what the docs (from SainSmart) say this uses. I tried to figure out the correct pins/locations but have had no luck.
Hope you understand what I am talking about.

Best Answer

Check this answer where I explain about an identical board and a gotcha with connections that vary with other implementations. The sketch is based on the auto scrolling sketch you mention in your question, but updated for the exact board you own.