aliff

Dependencies:   TextLCD keypad mbed

Files at this revision

API Documentation at this revision

Comitter:
aliffhilmie93
Date:
Mon Jun 04 16:02:58 2018 +0000
Commit message:
pty aliff

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	Mon Jun 04 16:02:58 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keypad.lib	Mon Jun 04 16:02:58 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/aliffhilmie93/code/keypad/#ced7b1445bc4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jun 04 16:02:58 2018 +0000
@@ -0,0 +1,50 @@
+#include "mbed.h"
+#include "keypad.h"
+#include "TextLCD.h"
+ 
+TextLCD lcd(D8, D9, D4, D5, D6, D7);
+
+ 
+int main() {
+                //  c0   c1   c2   c3  r0   r1   r2   r3    
+    Keypad keypad( PC_3,PC_2,PC_0,PC_1,PC_5,PC_4,PB_1,PA_0 );
+       
+    keypad.enablePullUp();
+    char key;
+//    lcd.printf(" ");
+    while (1) 
+    {
+         key = keypad.getKey();    
+         if(key != KEY_RELEASED)
+         {
+            lcd.locate (0,0);
+            lcd.printf("%c",key);
+            //wait(0.6);
+         }
+             if (key=='B')
+         {lcd.cls();
+             lcd.locate (0,0);
+             lcd.printf("BMT 4033");
+             }
+             if (key=='C')
+         {lcd.cls();
+             lcd.locate (0,0);
+             lcd.printf("Embedded");
+             }
+             if (key=='D')
+         {lcd.cls();
+             lcd.locate (0,0);
+             lcd.printf("System");
+             }
+             if (key=='E')
+         {lcd.cls();
+             lcd.locate (0,0);
+             lcd.printf("Design");
+             }
+             if (key=='F')
+         {lcd.cls();
+             lcd.locate (0,0);
+             lcd.printf("Score");
+             }
+}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jun 04 16:02:58 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/5aab5a7997ee
\ No newline at end of file