test program for keypad(Extended not only 3x4 but 4x4,4x5 and 5x5 keys)

Dependencies:   Keypad

Fork of study_step0 by Team_PjL

see /users/kenjiArai/notebook/keypadkey-matrix--control/

Revision:
4:0564f82dd0ef
Parent:
3:0c888cad9376
Child:
5:53fb9eed6b67
diff -r 0c888cad9376 -r 0564f82dd0ef key_complex.cpp
--- a/key_complex.cpp	Mon Apr 13 02:07:09 2020 +0000
+++ b/key_complex.cpp	Sat Aug 01 07:49:39 2020 +0000
@@ -5,7 +5,7 @@
  *  http://www7b.biglobe.ne.jp/~kenjia/
  *  https://os.mbed.com/users/kenjiArai/
  *      Created:    April      5th, 2020
- *      Revised:    April     13th, 2020
+ *      Revised:    August     1st, 2020
  */
 
 //  Pre-selection --------------------------------------------------------------
@@ -28,7 +28,6 @@
 DigitalOut  led0(A0);
 DigitalOut  led1(A1);
 DigitalOut  led2(A2);
-Serial      pc(USBTX,USBRX);
 //              X    Y    Z   W   V   A   B   C   D   E   OUT(XYZWV), IN(ABCDE)
 Keypad      key(D11, D10, D9, D8, D7, D6, D5, D4, D3, D2);
 
@@ -56,10 +55,10 @@
     uint32_t key_num;
     uint32_t counter = 0;
 
-    pc.printf("Start Key-Pad test 5x5 keys and/or state hold switch\r\n");
+    printf("Start Key-Pad test 5x5 keys and/or state hold switch\r\n");
     while(true) {
         while ((key_num = key.read()) != 0) {
-            pc.printf("%2u:[%2d] %c\r\n",
+            printf("%2u:[%2d] %c\r\n",
                       counter++, key_num, key_table[key_num]);
         }
         if (key.read_state(A_SW) == true) {