Introduction: Sainsmart LCD Shield

Picture of Sainsmart LCD Shield

This instructable will show you how to use a SainSmart LCD keypad shield.


You will need:

- An Arduino Uno

- SainSmart Keypad shield

Get one here: Here
- USB cable

Step 1: Setting Up

Picture of Setting Up

Place the Shield onto the Uno, and plug it in.

Step 2: The Code

Make sure you have the LiquidCrystal library installed.

// LiquidCrystal Print
// by Parzivail
#include
LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);

void setup()
{
lcd.clear();
lcd.begin(16, 2);

}

void loop()
{
lcd.setCursor(0, 0);
lcd.print("Hello, World!");

}

Step 3: Done!

Picture of Done!

Congrats, you have a working LCD shield.

Comments

Arduino4Me made it! (author)2015-03-01

Thanks, so much I tried everything to try to get it to work, and nothing but yours worked!

OmmyO (author)Arduino4Me2017-11-26

probably a bit late now but i had to use different lcd pins as follows

//define pins used by lcd display.
LiquidCrystal lcd (8, 9, 4, 5, 6, 7 );

hope this helps someone :)

BallscrewBob (author)2014-05-26

hmmm no button control ?

Not sure if you're still looking for button control on this, Bob, but the link below will give you pretty much everything you need. You'll probably have to tweak the values of readkey a little bit, but it worked just fine for me once I figured out the right values there.

(mine, incidentally, were left, 504; right, 0; up, 143; down, 328; select, 741; and null (no key pressed) was 1023. I haven't checked the other board that I got yet to see if it's the same values, but I suspect that each board will be slightly different based on tolerances in the values of the resistors used.)

https://codegists.com/code/arduino-lcd-keypad-shie...

Found the button control thanks.

Turns out I use similar routines quite a lot on other projects now after looking at the schem. sometimes simple as they use can have lots more uses.

123a3 (author)2016-07-05

No sketch works for me...

My shield just shows blocks in the first row, in the second nothing.

I`ve adjusted the gama also, any other recomandations?

123a3 (author)123a32016-07-06

it works ;)

I had to push it really deep in

KyleM3 (author)2014-12-22

Thanks I had troubles right away. This is the EXACT code that worked for me.

#include <LiquidCrystal.h>

// LiquidCrystal Print

// by Parzivail

LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);

void setup()

{

lcd.clear();

lcd.begin(16, 2);

}

void loop()

{

lcd.setCursor(0, 0);

lcd.print("<3 You Angela");

}

MichaelO20 (author)KyleM32015-07-14

Kyle, the code looks like it worked, but the screen doesn't show any words, just blocks. Any recommendations? Thanks

Parzivail (author)MichaelO202015-07-14

Try adjusting your gamma with the little potentiometer thing

About This Instructable

24,189views

29favorites

License:

Bio: Indie game developer that loves arduino and LEDs and gaming and stuff.
More by Parzivail:[UPDATED] Create a Minecraft ModNuts for Knots: Paracord Paraphernalia- The "Fob"Dancing LED's
Add instructable to: