keypad kullanimi

Dependencies:   mbed TextLCD keypad

Files at this revision

API Documentation at this revision

Comitter:
marvas
Date:
Wed Dec 04 11:59:18 2019 +0000
Commit message:
keypad kullanimi

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	Wed Dec 04 11:59:18 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/simon/code/TextLCD/#308d188a2d3a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keypad.lib	Wed Dec 04 11:59:18 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/yoonghm/code/keypad/#da060f8c03e8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Dec 04 11:59:18 2019 +0000
@@ -0,0 +1,34 @@
+#include "mbed.h"
+#include "TextLCD.h"
+#include "Keypad.h"
+TextLCD lcd(PB_0,PA_4,PC_3,PC_2,PB_3,PA_10);
+
+ 
+  // Define your own keypad values
+  char Keytable[] = { '1', '2', '3', 'A',   // r0
+                      '4', '5', '6', 'B',   // r1
+                      '7', '8', '9', 'C',   // r2
+                      '*', '0', '#', 'D'    // r3
+                    };
+                   // c0   c1   c2   c3
+ 
+  uint32_t Index;
+ 
+  uint32_t cbAfterInput(uint32_t index) {
+      Index = index;
+               lcd.cls();
+          lcd.printf("Basilan Tus:%c",Keytable[Index]);
+      return 0;
+  }
+ 
+  int main() {
+                  // r0   r1   r2   r3   c0   c1   c2   c3
+      Keypad keypad(PC_12, PC_10, PC_11,PD_2,PA_13,PA_14,PA_15,PC_8);
+      keypad.attach(&cbAfterInput);
+      keypad.start();  // energize the keypad via c0-c3
+ 
+      while (1) {
+          //__wfi();
+wait(100);
+      }
+  }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Dec 04 11:59:18 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file