Introduction: 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

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!

Congrats, you have a working LCD shield.

Comments

author
BallscrewBob (author)2014-05-26

hmmm no button control ?

author

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...

author

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.

author
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?

author
123a3 (author)123a32016-07-06

it works ;)

I had to push it really deep in

author
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");

}

author
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

author
Parzivail (author)MichaelO202015-07-14

Try adjusting your gamma with the little potentiometer thing

author
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!

picture_8.png

About This Instructable

23,578views

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: