4x4 Keypad easy to use library that pollis the interface width pullups

Dependents:   4x4KeyBoardExample xoxokey 4x4KeyBoardExample ProgettoCassaforte ... more

Fork of keypad by Dimiter K

Simple library for reading a 4x4 keypad width at ability to use internal pullups

Import program

00001 #include "mbed.h"
00002 #include "keypad.h"
00003  
00004 Serial pc(USBTX, USBRX); 
00005 
00006  
00007 int main() {
00008                 //  c0   c1   c2   c3  r0   r1   r2   r3    
00009     Keypad keypad( PC_3,PC_2,PA_0,PA_1,PA_4,PB_0,PC_1,PC_0 );
00010        
00011     keypad.enablePullUp();
00012     char key;
00013     pc.printf("Please touch a key on the keypad\n\r");
00014     while (1) 
00015     {
00016          key = keypad.getKey();    
00017          if(key != KEY_RELEASED)
00018          {
00019              pc.printf("%c\r\n",key);
00020              wait(0.6);
00021          }
00022     }
00023 }

Import library

Public Member Functions

Keypad (PinName col0, PinName col1, PinName col2, PinName col3, PinName row0, PinName row1, PinName row2, PinName row3)
Create a 4x4 (col, row) or 4x4 keypad interface
.
char getKey ()
Returns the letter of the pressed key
.
bool getKeyPressed ()
Detects if any key was pressed.
void enablePullUp ()
Enables internal PullUp resistors on the coloums pins.

Protected Member Functions

int getKeyIndex ()
return the index value representating the pressed key

History

doc update default tip

2015-09-20, by rlanghbv [Sun, 20 Sep 2015 06:00:00 +0000] rev 21

doc update


doc update

2015-09-20, by rlanghbv [Sun, 20 Sep 2015 05:56:16 +0000] rev 20

doc update


Doc Update

2015-09-19, by rlanghbv [Sat, 19 Sep 2015 19:54:18 +0000] rev 19

Doc Update


Doc Update

2015-09-19, by rlanghbv [Sat, 19 Sep 2015 19:45:57 +0000] rev 18

Doc Update


Doc Update

2015-09-19, by rlanghbv [Sat, 19 Sep 2015 18:50:53 +0000] rev 17

Doc Update


Doc Update

2015-09-19, by rlanghbv [Sat, 19 Sep 2015 18:45:01 +0000] rev 16

Doc Update


Doc Update

2015-09-19, by rlanghbv [Sat, 19 Sep 2015 18:35:49 +0000] rev 15

Doc Update


Code Formated properly

2015-09-19, by rlanghbv [Sat, 19 Sep 2015 18:15:01 +0000] rev 14

Code Formated properly


Doc Update

2015-09-19, by rlanghbv [Sat, 19 Sep 2015 17:13:19 +0000] rev 13

Doc Update


Doc Update

2015-09-19, by rlanghbv [Sat, 19 Sep 2015 17:11:29 +0000] rev 12

Doc Update