Home16x2 LCD keypad Shield
16x2 LCD keypad Shield
Out of stock
16x2 LCD keypad Shield16x2 LCD keypad Shield
Standard shipping in 7 working days

16x2 LCD keypad Shield

₹249
₹199
Saving ₹50
20% off
Out of stock
Product Description

The 16x2 LCD Keypad Shield is an Arduino-compatible shield that combines a 16x2 character LCD screen with a built-in keypad for user input. This shield is commonly used for projects that require both visual feedback (displaying text, sensor readings, etc.) and user interaction (button presses to control or navigate through menus).

Key Features of the 16x2 LCD Keypad Shield:

  1. 16x2 LCD Screen:
  • The shield has a 16x2 LCD display, which means it can display 16 characters per line and has 2 lines of text.
  • The screen is typically based on the HD44780 controller or compatible controller, which is a common standard for character LCDs.
  • The screen can display text, and with proper control, can be used to create menus, display data, and give feedback to the user.
  1. Built-in Keypad:
  • The keypad typically consists of 5 buttons (Up, Down, Left, Right, Select), which allow users to interact with the Arduino project by pressing the buttons.
  • The buttons are mapped to specific digital pins on the Arduino, and each button press corresponds to a different action or menu selection.
  1. Arduino Compatibility:
  • This shield plugs directly into the Arduino board, usually an Arduino Uno or similar model. It uses the I2C (or sometimes direct parallel) connection to control the LCD.
  • The buttons are connected via analog pins (typically A0-A4) on the Arduino, making it easy to read button presses.
  1. Contrast Control:
  • The shield typically has a potentiometer (small dial) that allows you to adjust the contrast of the LCD, making it easier to read the screen in different lighting conditions.
  1. Multi-purpose:
  • The combination of the LCD and keypad makes this shield perfect for projects that require menu navigation, control interfaces, and displaying real-time data.

Pinout and Connections:

The 16x2 LCD Keypad Shield connects directly to the Arduino board's pins, and the typical pinout for the buttons and LCD might look like this:

Pin Description:-

VCC Power (+5V)

GND Ground

VO LCD Contrast

RS Register Select (LCD)

RW Read/Write (LCD)

E Enable (LCD)

D0-D3 Data pins (LCD)

D4-D7 Data pins (LCD)

A0 Up button

A1 Down button

A2 Left button

A3 Right button

A4 Select button

The buttons are typically connected to the analog pins A0 to A4, and the shield handles reading the button states by reading the voltage at these pins, which changes based on which button is pressed.


Example Arduino Code to Use the 16x2 LCD Keypad Shield:

Here’s a simple example code to get started with the 16x2 LCD Keypad Shield, where the LCD displays different messages based on button presses.

#include <LiquidCrystal.h>

// Initialize the LCD (RS, E, D4, D5, D6, D7 pins)
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

// Button pin definitions
const int buttonPinUp = A0;
const int buttonPinDown = A1;
const int buttonPinLeft = A2;
const int buttonPinRight = A3;
const int buttonPinSelect = A4;

void setup() {
  // Start LCD and set up button pins
  lcd.begin(16, 2);  // 16 columns and 2 rows
  pinMode(buttonPinUp, INPUT);
  pinMode(buttonPinDown, INPUT);
  pinMode(buttonPinLeft, INPUT);
  pinMode(buttonPinRight, INPUT);
  pinMode(buttonPinSelect, INPUT);

  // Display an initial message on the LCD
  lcd.setCursor(0, 0); 
  lcd.print("Welcome!");
}

void loop() {
  // Read the button states
  int upState = analogRead(buttonPinUp);
  int downState = analogRead(buttonPinDown);
  int leftState = analogRead(buttonPinLeft);
  int rightState = analogRead(buttonPinRight);
  int selectState = analogRead(buttonPinSelect);

  // Clear the LCD screen and display a new message based on button press
  lcd.setCursor(0, 1); // Move cursor to the second line

  if (upState < 100) {
    lcd.clear();
    lcd.print("Up Button Pressed");
  } else if (downState < 100) {
    lcd.clear();
    lcd.print("Down Button Pressed");
  } else if (leftState < 100) {
    lcd.clear();
    lcd.print("Left Button Pressed");
  } else if (rightState < 100) {
    lcd.clear();
    lcd.print("Right Button Pressed");
  } else if (selectState < 100) {
    lcd.clear();
    lcd.print("Select Button Pressed");
  } else {
    lcd.clear();
    lcd.print("Waiting...");
  }

  delay(100);  // Small delay to debounce button presses
}


Origin:- China

Brand:- Generic

Share
Customer Reviews

Secure Payments

Shipping in India

Cash on Delivery

Great Value & Quality