Overview Arduino LCD Keypad Shield:
Arduino Uno, Diecimila, Duemilanove, and Freeduino boards, as well as other Uno-sized compatible boards, such as the Sparkfun Redboard, can all benefit from this 16×2 LCD and keypad shield!
Specifications of Arduino Lcd keypad shield:
- A backlight in blue with white letters.
- utilizes the LCD Library for 4 Bit Arduino.
- The Up, Down, Left, Right, and Select buttons are all on the same side of the keyboard.
- Adjusting the screen’s contrast.
- The reset button on the Arduino.
Because Arduino Lcd keypad shield pins are different from those used by the Arduino example sketches, in order for the display to function properly, when starting the library, use the following pin sequence:
LiquidCrystal lcd(8,9,4,5,6,7);
The buttons are connected to a single analog input pin through resistors, resulting in a different voltage for each button and allowing for a reduction in the number of input/output pins. Reading the buttons is straightforward, and an example code is provided below.
Pin Connections
Pin | Function |
Analog 0 | Buttons (select, up, right, down and left) |
Digital 4 | DB4 |
Digital 5 | DB5 |
Digital 6 | DB6 |
Digital 7 | DB7 |
Digital 8 | RS (Data or Signal Display Selection) |
Digital 9 | Enable |
Keep in mind that when this board is plugged in, you should not use pin Digital 10. (see here for more details)
By default, the backlight does not have a dimming function. PWM is required in order to make it dimmable. take a look at this instructable
www.instructables.com/id/Arduino-LCD-Backlight-Fix/
Arduino Lcd keypad shield is a little larger in size than an Arduino UNO, for example (measuring 8cm x 6cm). This is demonstrated in the photographs.
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.setCursor(0,0);
lcd.print("LCD Key Shield");
lcd.setCursor(0,1);
lcd.print("Press Key:");
}
void loop() {
int x;
x = analogRead (0);
lcd.setCursor(10,1);
if (x < 60) {
lcd.print ("Right ");
}
else if (x < 200) {
lcd.print ("Up ");
}
else if (x < 400){
lcd.print ("Down ");
}
else if (x < 600){
lcd.print ("Left ");
}
else if (x < 800){
lcd.print ("Select");
}
}
Reviews
There are no reviews yet.