Arduino SainSmart LCD 1602 Keyboard Shield

SainSmart 1602 LCD Keypad Shield Example Fix

The issue, my new sainsmart LCD keypad 1602 would not work with the default arduino liquid crystal examples for hello world or any thing else in the example section of LCD. After some research I figured out the issue, the sainsmart has a unique pin layout and there is an easy fix.   The default example uses a LCD  array of  //LiquidCrystal lcd(12, 11, 5, 4, 3, 2); but the sainsmart 1602 has a different layout. The Sainsmart pin array uses LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

Comment out or remove the the LINE of code with (12, 11, 5, 4, 3, 2)

//LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //<--removed
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); //Code for SainSmart 1602 KeyPad
Below is a working code example using the
SainSmart LCD 1602 Keyboard Shield on an Arduino UNO

TIP: dial down the potentiometer screw to get a more clear display, for the brave remove the clear protective plastic film that covers the LCD.

//SainSmart 1602 keypad shield hello world example code
// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
//LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
lcd.setCursor(0,1); // move to the begining of the second line
lcd.print("Second Line!");

void loop() {
// Turn off the display:
//Turn on the display:

PS: My wife asked if I was programming an old school pager ….I would have to agree with her on  the sainsmart 1602 keypad does look like an old school retro beeper / pager.

None the less… for 10.99 at microcenter it has some serious potential, and loads of fun! perfect for teaching / learning to code on an LCD.

When I had the LCD display “I LOVE YOU” …..  made her smile

share with friends

Share to Google Buzz
Share to Google Plus
Share to LiveJournal
Share to Odnoklassniki

5 Responses to Arduino SainSmart LCD 1602 Keyboard Shield

  1. Henry Santana January 13, 2018 at 8:19 pm #

    You might want to include keyboard reading code.

  2. Michael December 4, 2017 at 12:46 pm #

    Your post was very helpful.

    Thanks! 🙂

  3. powerful love spells August 29, 2017 at 7:35 pm #

    Hello,I read your new stuff named “Arduino SainSmart LCD 1602 Keyboard Shield – Brilliantly EasyBrilliantly Easy” on a regular basis.Your writing style is witty, keep up the good work! And you can look our website about powerful love spells.

  4. Angel90 October 4, 2016 at 7:51 am #

    I see a lot of interesting posts here. Your website can go viral easily, you need
    some initial traffic only. How to get initial traffic???
    Search for: bucksmagnet’s method

  5. rich williams March 25, 2016 at 6:36 am #

    Extremely helpful,thank you.

Leave a Reply