DFRobot 1602 LCD Keypad Shield for Arduino
This Keypad Shield with Display from DFRobot is perfect for the first attempts to control the 1602 LCD display with an Arduino. The five buttons are also practical, allowing you to easily implement menu navigation. You can find the "LiquidCrystal" library for controlling the display in the Library Manager. When initializing the LiquidCrystal, you need to use the following command to ensure the pin assignments are correct:
LiquidCrystal lcd(lcd(8,9,4,5,6,7);
The five control buttons all connect to the analog input A0. This significantly saves inputs that you can use for your project. When one of the buttons is pressed, a voltage can be measured on the A0 input, which is different for each button. In this Keypad Shield from DFRobot, care has been taken to ensure that the unused pins are routed to headers. This way, you can still connect sensors when the shield is mounted on an Arduino. The Keypad Shield is compatible with classic Arduinos like Uno, Duemilanove, Diecimilla, etc.
Documentation:
Example Code Keypad Shield with Arduino:
// include the library code: #include// initialize the library with the numbers of the interface pins LiquidCrystal lcd(8, 9, 4, 5, 6, 7); void setup() { Serial.begin(115200); // 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"); Serial.println("LCD Key Shield start"); lcd.setCursor(0,1); lcd.print("Press Key:"); } void loop() { int x; x = analogRead (0); lcd.setCursor(10,1); Serial.print("x="); Serial.println(x); 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 "); } }
Technical Details:
- Model: 1602 Character LCD
- Operating voltage: 5V
- Character resolution: 5x8 dots
- Characters: 2 lines x 16 characters
- Backlight: White characters on blue background
- 5x control buttons, 1x reset button
- 1x potentiometer for display contrast
- Size: 80 x 58 x 17mm
- Weight: 66.5g
Scope of Delivery:
- 1x DFRobot 1602 LCD Keypad Shield for Arduino
DFRobot 1602 LCD Keypad Shield for Arduino
- Brand: DFRobot
- Product Code: 421048
- Availability: In Stock
-
CHF13.90
- Ex Tax: CHF12.86
Related Products
LCD 1602 Keypad Shield for Arduino UNO
This Keypad Shield is perfect for initial attempts to control a display using an Arduino. The 5 butt..
CHF11.90 Ex Tax: CHF11.01
Gravity LCD Display 16x2 I2C RGB Backlight
This Gravity 16x2 character LCD display features an RGB backlight, where the color can be changed in..
CHF15.90 Ex Tax: CHF14.71
LCD1602 LCD Display 16x2 I2C RGB Backlight
This LCD display features an RGB backlight, which you can change the color of individually. Thus, yo..
CHF15.90 Ex Tax: CHF14.71
Character LCD Display 16x2 Blue 5V 1602
This user-friendly 16x2 LCD display is perfect for beginners who want to control a display with an A..
CHF8.90 Ex Tax: CHF8.23
Tags: Arduino, Keypad, DFRobot, Shield, Display, LCD, Module, Analog, Switch, Button, Character, LCD, Display, Blue, Display, Illuminated, Blacklight, Backlight, 1602, 8x16, DFR0009