[Arduino] DFRobot LCD Keypad Shield DFR0009

Time to open up the new toys I got from China, DFRobot LCD Keypad Shield (DFR0009)! As I said, I ordered this from China’s ebay equivalent, Taobao.com, got this for 30 RMB ($5 USD), pretty cheap for a LCD display panel, let alone this is a shield with keypad! In the US, it is being sold for $15!!! Anyway, the link is follow if anyone is interested. Maybe I will do a post about ordering stuffs directly from China. I spent like $50 total and stocked up my electronic inventory with all kinda of new shields, joysticks…

http://item.taobao.com/item.htm?id=13226993412

Using this shield is pretty much the same as all other LCD display. It uses Digital Pins: 4, 5, 6, 7, 8, 9 for LCD data and 10 for LED back light. Analog Pin 0 (A0) is used for the keypad. Pressing down various buttons (except Reset) will result in different A0 values, the default unpressed value for mine is 1023. So here’s the code on how to use this thing.

Here’s the schematic for the shield. Look at J5 for digital access and J6 for analog access.

http://www.dfrobot.com/image/data/DFR0009/DFR0009SCH01.pdf


/* Yu Hin Hau
 * DFRobot LCD Keypad Shield Tutorial
 * 7/29/2012
 */

//Initialize LCD
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

void setup()
{
//Set LCD Display Size
lcd.begin(16,2);
lcd.clear();

//Control LED Backlight @ D10
pinMode(10, OUTPUT);
}

void loop()
{
  //Set LED Backlight to OFF
  digitalWrite(10, LOW);

  //Read Shield Button from Analog 0 Pin
  double button = analogRead(0);

  //Set LCD Display Settings
  lcd.setCursor(0,0);
  lcd.println("Analog 0 Value:  ");

  lcd.setCursor(0,1);
  lcd.print(button);
  lcd.println("                ");

}
Advertisements

11 thoughts on “[Arduino] DFRobot LCD Keypad Shield DFR0009

  1. This was a big help. Yours is the only example I’ve seen so far that told me pin 10 is back lighting and some code how to use it. I would really like to see your little experiment as I might learn something or get an idea from it. Thank you for taking your time to post this and help others. If I can help you with anything let me know

  2. Definitely believe that which you said. Your favorite
    justification appeared to be on the internet the simplest thing to be aware of.
    I say to you, I certainly get irked while people think about
    worries that they plainly do not know about. You managed to
    hit the nail upon the top and also defined out the whole thing without having
    side-effects , people could take a signal. Will likely be back to get more.
    Thanks

  3. My spouse and I absolutely love your blog and find most of your post’s to be what precisely I’m
    looking for. Does one offer guest writers to write content for yourself?
    I wouldn’t mind composing a post or elaborating on many of the subjects you
    write related to here. Again, awesome web log!

  4. Excellent blog right here! Additionally your web site lots up fast!
    What host are you using? Can I am getting your associate hyperlink
    for your host? I wish my site loaded up as fast as yours lol

  5. Pingback: [Arduino] DFRobot LCD Keypad Shield DFR0009 | 1 hobidest

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s