KEYPAD LCD MAIN PROGRAM JADI

Dependencies:   KeypadLib TextLCD mbed

Fork of 4x4KeyBoardExample by fitri ariffin

Revision:
3:f973bf5ad35d
Parent:
2:6b74f02a9e87
--- a/main.cpp	Thu May 17 07:48:58 2018 +0000
+++ b/main.cpp	Thu May 17 08:13:54 2018 +0000
@@ -1,7 +1,9 @@
 #include "mbed.h"
 #include "keypad.h"
+#include "TextLCD.h"
  
 Serial pc(USBTX, USBRX); 
+TextLCD lcd(D8, D9, D4, D5, D6, D7);
 
  
 int main() {
@@ -10,12 +12,15 @@
        
     keypad.enablePullUp();
     char key;
+    lcd.printf("key =");
     pc.printf("Please touch a key on the keypad\n\r");
     while (1) 
     {
          key = keypad.getKey();    
          if(key != KEY_RELEASED)
          {
+              lcd.locate (4,1);
+             lcd.printf("%c",key);
              pc.printf("%c\r\n",key);
              wait(0.6);
          }