Sainsmart LCD Shield

About: Indie game developer that loves arduino and LEDs and gaming and stuff.

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

Share

Recommendations

  • Fix It! Contest

    Fix It! Contest
  • Tiny Home Contest

    Tiny Home Contest
  • Metalworking Contest

    Metalworking Contest

9 Discussions

0
None
lee_lvd

Tip 8 months ago on Step 2

For me to get the above code to work I had to change this to this
#include
LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);
#include
LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);

0
None
Peter.SteeleBallscrewBob

Reply 1 year ago

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

0
None
BallscrewBobPeter.Steele

Reply 1 year ago

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.

0
None
123a3

2 years ago

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?

1 reply
0
None
123a3123a3

Reply 2 years ago

it works ;)

I had to push it really deep in

0
None
KyleM3

3 years ago on Introduction

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

}

2 replies
0
None
MichaelO20KyleM3

Reply 3 years ago on Introduction

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