162 16X2 1602 Character LCD Module Display Screen LCM LCD Keypad Shield for Arduino Duemilanove UNO MEGA2560 MEGA1280

4.18$

Sold By: Shop Manager

In stock

Compare

162 16X2 1602 Character LCD Module Display Screen LCM LCD Keypad Shield for Arduino Duemilanove UNO MEGA2560 MEGA1280
162 16X2 1602 Character LCD Module Display Screen LCM LCD Keypad Shield for Arduino Duemilanove UNO MEGA2560 MEGA1280

  • 16×2 LCD Keypad module for Arduino Diecimila Duemilanove, UNO, MEGA1280, MEGA2560 board.

  • Blue Backlight with white words, adjustable backlighting.

  • 4 Bit Arduino LCD Library

  • 100% brand new and high quality

Package Include:

1 x 1602 LCD Board Keypad Shield (LCD with Blue Backlight)

 

Arduino Offical Code:

//example use of LCD4Bit_mod library
#include
//create object to control an LCD.
//number of lines in display=1
LCD4Bit_mod lcd = LCD4Bit_mod(2);

//Key message
char msgs[5][15] = {“Right Key OK “,
“Up Key OK “,
“Down Key OK “,
“Left Key OK “,
“Select Key OK” };
int adc_key_val[5] ={30, 150, 360, 535, 760 };
int NUM_KEYS = 5;
int adc_key_in;
int key=-1;
int oldkey=-1;

void setup() {
pinMode(13, OUTPUT); //we’ll use the debug LED to output a heartbeat

lcd.init();
//optionally, now set up our application-specific display settings, overriding whatever the lcd did in lcd.init()
//lcd.commandWrite(0x0F);//cursor on, display on, blink on. (nasty!)
lcd.clear();
lcd.printIn(“KEYPAD testing… pressing”);

}

void loop() {

adc_key_in = analogRead(0); // read the value from the sensor
digitalWrite(13, HIGH);
key = get_key(adc_key_in); // convert into key press

if (key != oldkey) // if keypress is detected
{
delay(50); // wait for debounce time
adc_key_in = analogRead(0); // read the value from the sensor
key = get_key(adc_key_in); // convert into key press
if (key != oldkey)
{
oldkey = key;
if (key >=0){
lcd.cursorTo(2, 0); //line=2, x=0
lcd.printIn(msgs[key]);
}
}
}

//delay(1000);
digitalWrite(13, LOW);
}

// Convert ADC value to key number
int get_key(unsigned int input)
{
int k;

for (k = 0; k < NUM_KEYS; k++)
{
if (input < adc_key_val[k])
{

return k;
}
}

if (k >= NUM_KEYS)
k = -1; // No valid key pressed

return k;
}
LCD4Bit_mod.h

162 16X2 1602 Character LCD Module Display Screen LCM LCD Keypad Shield for Arduino Duemilanove UNO MEGA2560 MEGA1280

Shenzhen Surenoo Technology Co., Ltd.” is a professional display supplier since 2005, The company has its own trademark “Surenoo Display“, dedicated to the LCD industry over 10 years, supply service for numerous domestic and foreign eBay and Alixpress buyers and companies. After more than ten years of development, it has gradually gained recognition and recognition from domestic and foreign customers. The company has a rich product line. The company’s designers are composed of a group of experienced and experienced professionals who can provide customers with fast, high-quality design solutions and meticulous technical support.

In June of 2019, we joined the Alibaba China Supplier Gold Certified Member, and we will provide professional services to our customers with more advantageous LCD product resources.

Factory

162 16X2 1602 Character LCD Module Display Screen LCM LCD Keypad Shield for Arduino Duemilanove UNO MEGA2560 MEGA1280

Additional information

Brand Name

SURENOO

Origin

CN(Origin)

Display Mode

NC

Model Number

1602

is_customized

Yes

Type

Character

Resolution

16*2

Semiconductors & Actives Type

lcds & displays

Only logged in customers who have purchased this product may leave a review.

Reviews

There are no reviews yet.

Vendor Information

  • No ratings found yet!

Questions and answers of the customers

There are no questions yet, be the first to ask something for this product.

Main Menu

162 16X2 1602 Character LCD Module Display Screen LCM LCD Keypad Shield for Arduino Duemilanove UNO MEGA2560 MEGA1280