Arduino Keypad LCD Shield

$19.80
  • Units in Stock: 19
  • Date Added: Friday 23 April, 2010
Add to Cart:

Product Description:

Arduino Keypad LCD Shield contains 16*2 LCD with contrast adjustment and backlight. LCD dispays white letters on blue background. It uses only an analog port to input the 5 keys' signal. Here is also a reset button. Still unused IO is prepared for expansion.

Date port: PIN4 (DB4), 5 (DB5), 6 (DB6), 7 (DB7), 8 (RS), 9 (E), 10 (backlight control), simulation key port A0.

Working with Arduino:

Pin definition:

Module Test:

Connect Arduino LCD Keypad Shield with Arduino. Download "LCD4Bit_mod.h" library file and save to the "arduino-0015 hardware libraries". Compile the test program below and download to Arduino. If you use the Aduino Keypad LCD Shield for the first time and see nothing on the screen, you may need to use screwdriver to adjust RP1 which controls contrast. If clockwise rotation, characters can appear clearly.

Connecting pic:

GP2D12 distance measurement code:

# Include

LCD4Bit_mod lcd = LCD4Bit_mod (2);

char GP2D12;
char a, b;
char str1 [ ] = "Renge:";
char str2 [ ] = "Renge Over";
char str3 [ ] = "cm";

void setup ()
{
lcd.init ();
lcd.clear ();
lcd.printIn ("GP2D12 testing ...");

}

void loop ()
{
GP2D12 = read_gp2d12_range (1);
if (GP2D12> 80 | | GP2D12 <10)
{
lcd.cursorTo (2,0);
lcd.printIn (str2);
}
else
{
a = 0x30 + GP2D12/10;
b = 0x30 + GP2D12% 10;
lcd.cursorTo (2, 3);
lcd.printIn (str1);
lcd.print (a);
lcd.print (b);
lcd.printIn (str3);
}
delay (50);
}

float read_gp2d12_range (byte pin)
{
int tmp;
tmp = analogRead (pin);
if (tmp <3) return -1;
return (6787.0 / ((float) tmp - 3.0)) - 4.0;
}

Qty Discounts Off Price
1-4
$19.80
5-9
$16.83
10-49
$15.84
50+
$13.86
Copyright © 2014 Elechouse.
Powered by ELECHOUSE