LCD help.....

Hello all, I'm pretty new here. I've recently picked up a LCD-KEYPAD module from ekitszone and need a little help. It came with some files that need to go into the arduino/lib/targets/libraries folder ? I have a lib folder but there are no subfolders within it.

What do I need to do to get control over this LCD shield ? Is there a few samples sketches that for sure work that I might look at ? I guess I don't know how to really use the libraries either ??/ help ? Thanks, CM

The readme file on the website tells all.

I copied it here:

This is a C++ library for Arduino for controlling an HD74800-compatible LCD in 4-bit mode.
Tested on Arduino 0010 

Installation
--------------------------------------------------------------------------------

To install this library, just place this entire folder as a subfolder in your
Arduino/lib/targets/libraries folder.

When installed, this library should look like:

arduino-0010/hardware/libraries/LCD4Bit_mod              (this library's folder)
arduino-0010/hardware/libraries/LCD4Bit_mod/LCD4Bit_mod.cpp  (the library implementation file)
arduino-0010/hardware/libraries/LCD4Bit_mod/LCD4Bit_mod.h    (the library description file)
arduino-0010/hardware/libraries/LCD4Bit_mod/keywords.txt (the syntax coloring file)
arduino-0010/hardware/libraries/LCD4Bit_mod/examples     (the examples in the "open" menu)
arduino-0010/hardware/libraries/LCD4Bit_mod/readme.txt   (this file)

Building
--------------------------------------------------------------------------------

After this library is installed, you just have to start the Arduino application.
You may see a few warning messages as it's built.

To use this library in a sketch, go to the Sketch | Import Library menu and
select LCD4Bit_mod.  This will add a corresponding line to the top of your sketch:
#include <LCD4Bit_mod.h>

To stop using this library, delete that line from your sketch.

Geeky information:
After a successful build of this library, a new file named "LCD4Bit_mod.o" will appear
in "Arduino/lib/targets/libraries/LCD4Bit". This file is the built/compiled library
code.

If you choose to modify the code for this library (i.e. "LCD4Bit_mod.cpp" or "LCD4Bit_mod.h"),
then you must first 'unbuild' this library by deleting the "LCD4Bit_mod.o" file. The
new "LCD4Bit_mod.o" with your code will appear after the next press of "verify"

There are example on the site too:
http://www.ekitszone.com/index.php?main_page=product_info&cPath=1&products_id=2&zenid=5edebb78bc0b0782789ffadb46aec31b

Uh Yeah, I'm having the same probs with getting the LCD to work as well.
I got the arduino 1280, and this same LCD Keypad Module Shield.
I've UpLoaded the sketch, and the lcd does nothing.
I have the Arduino 0017 and only has a place where to put the files in MyDocuments/Libraries folder. It's a sub folder in that Libraries folder.

And I've done everything that's posted on their site, in that TEXT file and it still says that it can't be used because there can't be any spaces or start with number.

I'm a TOTAL nubie to the arduino, and have just tinkered with the blinking led and modded the code, uploaded that just fine.
But not with this LCD Keypad Module.

And the description to install just doesn't seem right, as if the install instructions were for an earlier arduino enviroment.

help :wink:

Okay, scratch that. I just loaded another sketch which tests the keypad buttons, and it works.

But how or where do I get a sketch that I can modify to display my own text?

Very cool stuff! :wink:

Its a pity they ship this stuff with out of date software. The LCD4bit library is an old kludge to make standard LCDs work using 4 data lines.

The standard IDE includes the liquidCrystal library and examples which is far superior to the LCD4bit library and will also now work with 4 bits.

If I've read the schematic right, if you change

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

to

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

in the LiquidCrystal examples, the standard examples in the IDE should work and give you some further clues without the need for add on libraries. It also gives you the benefits of an official library and much faster updating of the LCD display.

The push buttons are an entirely unrelated circuit using a short circuited voltage divider and an analogue pin and don't need a Library.

I haven't tried that yet, But THANK YOU!!!
Now let me ask you this.
I have the mega.
Which LCD would you buy, that's within a reasonable price range, and that has super abilities?

And thank you again for the help!

YES!!!!!
That did it!!!

In the example code, it displays "0123456789" and scrolls.
Can I change what the display shows?

I just buy cheap HD44780 compatibles from ebay.

These are the same type as the last ones I bought.

http://cgi.ebay.co.uk/Lot-of-10-LCD-display-modules-16x2-characters-HD44780_W0QQitemZ160392478949QQcmdZViewItemQQptZUK_BOI_Electrical_Components_Supplies_ET?hash=item25582300e5

Just do a search for HD44780 which is the almost universal interface for character LCD panels and what the LiquidCrystal Library works with

They work OK for what I do

This is what I did with the last ones I got

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1260399444

I've never used the autoscroll, I just use plain writing to the screen, load up the 'HelloWorld' example, alter the code as in my first post so it works with your panel. You can then alter the lcd.print line to say what you want. Have a look through the other examples to learn what you can do with LCDs

Very awesome!!!
I tried your code, and all's that I got on my lcd was "LCD Ready".
I guess that's where it was waiting for the inputs to start talking?

Now for the next step, How to get information like a temperature reading?
I own a thermistor. Can I use this, or do I need something else.
Everything that I've seen requires 3 connections, like a +, - and data or output or something.

This arduino mega is cool!
I now have the dual motor shield, the lcd button shield, mini protoboard shield and sensor shield.
I was capable of getting all to run on the basic learner code.

And that's another thing. Once I put on my lcd shield, it covers all inputs. How do I get around that?
Is there like a Riser situation there somewhere?
Or do I have to go to an extension board?

And how do you connect two pieces of code on the same sketch?
:-?

And how do you connect two pieces of code on the same sketch?

You'll need to explain that question a little better, I'm afraid.

If you want to know how to merge two sketches, post both of them, explain what each does, and what you want the final sketch to do, and we can help you figure out what goes where.

It's pretty simple, though. The setup function gets called once, so any one-time stuff goes there. The loop function is called over and over. So, stuff that needs to get done may times (reading sensors, writing to the LCD, spinning motors, etc.) goes there.

If it were me, I'd make myself something with stripboard and a soldering iron once I'd a clear idea of what I wanted it to do. Start writing your own stuff and learn what it does, once you've done that the world is your oyster.

Arduino is pretty boring if all you do is buy shields and run other peoples code.

That's why I asked' "How do you combine two pieces of code." To understand how the code works.
Believe me, In the area of research that I am in, I'll need alot more than just temperature readings. So just copying others code won't work.
Thanks for your help, I totally appreciate it.
It's time to pick up a good book an start learning.

Again, Thanks!

Pluggy, I did it!!!
I started reading, and I wrote my first ever code!!
Thanks for giving me that push to get into understanding it.

I wrote my first code on making some quad police lights using 4 leds. LOL. Came out very cool!!

That opened up a whole new world.

Thanks again!
:wink:

Good to hear, enjoy yourself, thats what its all about. :slight_smile:

hi all

I just found this thread while searching for some info about hooking up an LCD and a 12 button Keypad, sorry if this is question takes the thread off topic.

Can anyone point me to some code that will help me understand what's required to display the keypad input on an LCD or how to do it? I want to use the keypad input elsewhere in the sketch but can probably figure that bit out.

There doesn't seem to be anything out there on this topic and I'm sure it would be a useful addition to the playground / tutorials too. The LCD and Keypad examples are very helpful but haven't helped me tie the two together!

Many thanks.

The keypad input is a number. The output to the LCD is numeric, sent using the print function(s) of the lcd library.

Which LCD library, if any, are you using?
Which keypad library, if any, are you using?

Sending keypad data to the lcd should be a trivial.

Hi Paul
Thanks for taking the time to reply. The "print fucnction(s) of the LCD library" is where I'll go look next ;D

LCD library used is LiquidCrystal.h
Keypad library is Keypad.h

I'm sure it IS trivial! :cry: but ability, experience and knowledge are some of the factors in making it so. Sadly I have only a little of one and none of the other two of those attributes. ;D

But, I am having fun exploring this amazing world!

Presumably, you are displaying something on the LCD now. Right? That's how you know it works...

Presumably, you are displaying some information that tells you the correct key value was read. Right? Using Serial.print?

Change how the key in data is validated, from Serial.print to LCD.print.

Yes and yes. LCD and keypad both working with example sketches, albeit on different arduinos.

Just merged the sketches and got a "keypad operated matrix screen saver"! :-[

I'll have a play! lol

i am having probs with my lcd4bit code and when i verify and then upload it is tell me the in function 'void loop()'; error: 'key' was not declared in this scops in funtion 'in get-key(unsigned int)':