0% found this document useful (0 votes)
116 views6 pages

LCD Keypad Shield

LCD Keypad Shield

Uploaded by

Alex Harijanto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
116 views6 pages

LCD Keypad Shield

LCD Keypad Shield

Uploaded by

Alex Harijanto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 6
sranore LCD Keypas Shield -Elecrow LCD Keypad Shield From Elecrow Contents = 1 Description = 2 Featrues = 3 Diagram = 4 Pin Allocatior = 5 Usage = 6 Resource « 7 How to buy Description The LCD Keypad Shield is arduino compactible boards,to provide a user-friendly interface that allows users to display what they want to and 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(AD0). The key value is read through a 5 stage voltage divider. Model: MCS01602M (http://www.clecrow.com/Icd-keypad-shield-for-arduino-p- 311.html) htpsshwww olecrow.comiwikiindex php?Ule=LCD_Keypad_Shild 18 812472018 LCD Keypa Shield -Elecrow )) (EM a,” eer Lira Peer bak A) as. for eoar SaROBOT ee er faye ate POUM Sure pauas Featrues = The keypad interface uses only one ADC channel. = Can control the contrast of LCD through the potentiometer. = Can shows the words as you like. Diagram Pin Allocatior RS (Data or Signal Display Selection) htps:www olecrow.comiwikiindex php?Ule=LCD_Keypad_Shild 26 ararore LCD Keypad Shield -Etcrow Digital 9 Enable Digital 10 Backlit Control Usage = How to control the Keypad and make selects The following sample code is to introduce how to use this model.it shows what key you pressed down and the system time. 1.Hardware connection Plug it into the Arduino/Crowduino. 2.Download the File:LiquidCrystal library (http:/Avww.clecrow.com/wiki/index.php? title=File:LiquidCrystal.zip) . 3.Unzip it into the libraries file of Arduino IDE by the path: ..\arduino-1.0\libraries. 4.Copy and paste code below to a new Arduino sketch. = created by © Ark Bramell, July 2610 * Modified by keen + bate: 05/08/2017 = Function: this program will test the LcD panel and the buttons. [Sample using Liquidcrystal Library include select the pins used on the LCD panel Aquidcrystal 1cd(8, 8, 4, 5, 6 75 1 define some values used by the panel and buttons, nt led key = 85 Hint ade_key_in = @; lidetine benkiGHT © Aidetine ine hitps:www olecrow.comiwikiindex php?Ule=LCD_Keypad_Shild 36 sranore LCD Keypas Shield -Elecrow lndeFine btnNoNe Ud read the buttons i nt read_Lco_buttons() ‘ade_key_in = analogtead(8); _// read the value fro the sensor 7/ Ay buttons when read are centered at these valies: 8, 148, 329, $04, 741 11 we add approx 58 to those values and check to see if we are close Ef (ade_key_in > 1508) return BtANONE; // We make this the Ist option for speed reasons since it will be the most likely resi, Ef (aéelkey_in < 58) return benarGnTs t Af (ade_key_in < 195) return benuP; Af (ade_key_in < 380) return btnDoWN; Af (adelkey_in < 580) return BEnLEFT; Ef (gde_key_in < 700) return BensELECr; return BtnNGNe; // when 211 others fail, return this ed. begin(3s, 2); 11 start the Library Led. setcursor(@,@); ed.print("Push' the buttons"); // print a simple message jd Loop) Led. setcursor(9, 4); 11 move cursor to second Line "1" and 9 spaces over Led.print(aillss()/100@);_‘// display seconds elapsed since power-up Led. setcursor(a,1); 11 move to the bepining of the second Line 1ed_key = read_{cD_buttons();// reaé the buttons switch (lcd_key) 11 depending on which button was pushed, we perform an action ‘ ¢ Led. print(*AEGAT *); break; { ed. print ("LEFT break: case binuP: { Led.print("UP*)5 break; cease btnd04N: { Led. print(“DOWN *); break; case btnSELECT: ¢ Led. print(“SELECT"); break; ‘case btnNONE: bo¢ Ted. print(*WONE *); breaks hntpssiwwucelecrow.comiwikiindex php? 406 sranore LCD Keypas Shield -Elecrow 5.Upload the code,the LCD will display the button which you press. Er ae hitpshwuuelecrow.comiwikindex. php ?tive= D_Keypad_Shisle 56 sranoe LCD Keypas Shield -Elecrow Resource = Library files: LiquidCrystal (http://www. clecrow.com/wiki/images/c/c9/LiquidCrystal.zip) = LCD datesheet :LCD1602.PDF (http://www. elecrow.com/wiki/images/ 1/16/LCD1602.pdf) = Schematic of LCD keypad Shield (http://www. elecrow.com/wiki/images/5/56/LCDKeypad_Shield_V1.0_SCH.pdf) How to buy Click here (http://www.clecrow.com) to buy LCD Keypad Shield ,or other products (http://www.clecrow.com) you like, Retrieved from "https://www.elecrow.com/wiki/index.php? title-LCD_Keypad_Shield&oldid=17197" = This page was last modified on 5 May 2017, at 08:15. = This page has been accessed 3,906 times. htpsshwww olecrow.comiwikiindex php?Ule=LCD_Keypad_Shild 6

You might also like