LCD Keypad Shield from DealExtreme – Programming Tutorial

DealExtreme is getting into building DIY projects these days and the number of Arduino compatible sensors / equipments is rapidly increasing on their website with free shipping all around the world.

LCD Keypad with Arduino Duemilanove

LCD Keypad with Arduino Duemilanove



This time I have found some useful libraries for the LCD + Keypad they sell which could be bought from this link.

You could first prepare the library for the component. There are some libraries that are designed for some components very similar to the one sold on DX. You can find a tutorial on this website how to customize them to fit new Arudino (see here).

The code example for writing on LCD

[code language="Arduino"]
#include <LCD4Bit_mod.h>

LCD4Bit_mod lcd = LCD4Bit_mod(2);

int counter = 0;
char counterStr[30];

void setup(){
lcd.init();
lcd.clear();
lcd.printIn("Welcome ...");
delay(1000);
}

void loop(){
itoa(counter, counterStr, 10);
lcd.clear();
lcd.printIn("counting ");
lcd.printIn(counterStr);
counter++;
delay(1000);
}
[/code]

One thought on “LCD Keypad Shield from DealExtreme – Programming Tutorial”

  1. Thanks for your useful tutorial Shahab
    Just for notice some points:

    Here you use LCD4Bit_mod (library), and this is available for download here:
    http://www.robotshop.com/content/ZIP/dfrobot-lcd4bit-mod.zip
    (this library aren’t default included with arduino, so you have to download it and put it in the right folder, then you can use and call if from your arduino code)

    and in this code you use itoa (C function), here is a little tutorial about that:
    http://www.cplusplus.com/reference/clibrary/cstdlib/itoa/

Comments are closed.