LCD1602 character LCD input and output expansion board LCD Keypad Shield ARDUINO
LCD Keypad Shield input and output expansion board using the 2-line 16 character LCD with backlight and contrast adjustment, use an analog port will complete the five key input, a reset button, the unused IO ports are expanded on standby, make full use of IO ports. Occupancy digital port: PIN4 (DB4), 5 (DB5), 6 (DB6), 7 (DB7), 8 (RS), 9 (E), 10 (backlight control), simulation key port A0 . Used in conjunction with the Arduino:
Pin definition:
Debug module:
The LCD Keypad Shield plugged into the Arduino controller, and then need to download LCD4Bit_mod.h (Save as) the file to the library arduino-0015 hardware libraries, and then compile the following test program will be downloaded to Arduino, the first use LCD Keypad Shield, the first observation there is no LCD display character, if the character does not appear that the contrast may be incorrect, you can use a flat head screwdriver to adjust RP1 (clockwise rotation), transferred to clear character to appear.
Professional anti-static packaging
Test renderings:
GP2D12 ranging codes:
#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;
- sale
- Arduino
- GPS
- GSM/GPRS
- LCDs
- Single Board Computerv
- Tools
- Development Boards
- Breakout Boards
- Power and Batteries
- Unmanned Aerial System
- Programmers
- Printer
- Tablet
- Intelligent Building
- Electric Vehicle
- Drivers
- Wireless and Communications
- Robotics
- Tracking
- solar Cell
-
Sensors
- IMU/AHRS
- PIR
- Ultrasonics
- Biometrics
- Touch
- liquid level sensor
- Radiations
- Current/Voltage
- Proximity Sensor
- Temperature
- Humidity
- Inclinometer
- Gyro
- Accelerometers
- Flame
- Sound
- Pressure
- Flow Meter
- GAS
- Laser
- Infrared
- Mocrowave
- Magnet & Compass
- Light / image / Color
- Vibration/Force/Torque/Flex
- anemometer
- ID
- Sound
- Components
- Cables
- Interface Converter
- LED and Lighting