This is my first programming using a 4 X 4 key pad to communicate with the mbed to the LCD.

Dependencies:   keypad TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
daryl2110
Date:
Fri Nov 11 01:27:41 2011 +0000
Commit message:

Changed in this revision

TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
keypad.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Fri Nov 11 01:27:41 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keypad.lib	Fri Nov 11 01:27:41 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/DimiterK/code/keypad/#1fa357ea3fcc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Nov 11 01:27:41 2011 +0000
@@ -0,0 +1,51 @@
+#include "mbed.h"
+#include "TextLCD.h"
+#include "keypad.h"
+
+DigitalOut myLed(LED1);
+Keypad telepad(p28, p27, p26, p25,
+               p24, p23, p22, p21);
+
+ 
+TextLCD lcd(p15, p16, p17, 
+            p18, p19, p20);
+
+  int main (){
+  char key;
+  int x = 5, y = 0;
+
+  /*
+  lcd.printf("Loading.");
+  wait(0.5);
+  lcd.cls();
+  lcd.printf("Loading..");
+  wait(0.5);
+  lcd.cls();
+  lcd.printf("Loading...");
+  wait(2);  
+  lcd.cls();
+  lcd.printf("Hello :))");
+  wait(2);
+  lcd.cls();
+  */
+  
+  lcd.printf("BUS:");
+  
+  while (1) 
+  {
+    
+    key = telepad.getKey();
+    if (key != KEY_RELEASED){
+    lcd.putc(key);
+    lcd.locate(x++, y);
+    wait(1);
+   
+    if (key == '*')
+    lcd.locate(0,1);
+    
+    
+  
+        }  
+      }   
+    }
+  
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Nov 11 01:27:41 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912