Sainsmart LCD Shield

Published

Introduction: Sainsmart LCD Shield

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

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

  • Clocks Contest

    Clocks Contest
  • Planter Challenge

    Planter Challenge
  • Make it Move Contest

    Make it Move Contest
user

We have a be nice policy.
Please be positive and constructive.

Tips

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

Questions

8 Comments

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.

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

it works ;)

I had to push it really deep in

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

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

Try adjusting your gamma with the little potentiometer thing