LCD KeyPad Shield For Arduino SKU: DFR0009| Contents [hide]ÂIntroductionThis is a very popular LCD Keypad shield for Arduino or Freeduino board. It includes a 2x16 LCD display and 6 momentary push buttons. Pins 4, 5, 6, 7, 8, 9 and 10 are used to interface with the LCD. Analog Pin 0 is used to read the pushbuttons. The LCD shield supports contrast adjustment and backlit on/off functions. It also expands analog pins for easy analog sensor reading and display. The LCD Keypad shield is developed for Arduino compatible boards, to provide a user-friendly interface that allows users to go through the menu, make selections etc. It consists of a 1602 white character blue backlight LCD. The keypad consists of 5 keys — select, up, right, down and left. To save the digital IO pins, the keypad interface uses only one ADC channel. The key value is read through a 5 stage voltage divider. Specification
PinoutLibrary ExplanationFunction ExplanationLiquidCrystal(rs, enable, d4, d5, d6, d7) Creates a variable of type LiquidCrystal. The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines unconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; if so, omit it from this function's parameters. for example: LiquidCrystal lcd(8, 9, 4, 5, 6, 7); lcd.begin(cols, rows) Initializes the interface to the LCD screen, and specifies the dimensions (width and height) of the display. begin() needs to be called before any other LCD library commands.for example: lcd.begin(16, 2); lcd.setCursor(col,row) Set the location at which subsequent text written to the LCD will be displayed. for example: lcd.setCursor(0,0); lcd.print(data) Prints text to the LCD.for example: lcd.print("hello, world!"); lcd.write(data) Write a character to the LCD.
TutorialExample 1This example will test the LCD panel and the buttons.When you push the button on the shield,the screen will show the corresponding one. Connection: Plug the LCD Keypad to the UNO(or other controllers)
Example 2This example shows that reads an analog input on pin 1, prints the result to the LCD. This program takes the temperture sensor LM35 for example.
Plug the LCD Keypad to the UNO(or other controllers) Temperture sensor: S(blue) -- A1() Note: A0 has been occupied. VCC(red) -- VCC GND(black) -- GND Tricks for changing sensor cable pin mapping Connction DiagramSample code
ResultTrouble shooting
|
Projects‎ > ‎Arduino Yun‎ > ‎