1602 LCD Keypad Shield for Arduino Duemilanove FZ0032-DIY
- Product Code: FZ0032-DIY 1602LCD
- Availability: In Stock
- $7.99
- Ex Tax: $7.99
- Price in reward points: 2
- 2 or more $7.39
- 5 or more $5.99
- 20 or more $4.69
- 50 or more $3.69
Description:
This is a 16x2 LCD Keypad module for ARDUINO / Arduino Diecimila Duemilanove / FREEDUINO board..
Blue Backlight with white words
Uses 4 Bit Arduino LCD Library
100% brand new and high quality
The Modified LCD4Bit library and Schematic will send by email.
GP2D12 ranging code:
#include <LCD4Bit_mod.h>
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;
}
Package Included:
1 x Keypad Shield LCD 1602