Demonstrates handling events of a 4x4 keypad Forked from https://developer.mbed.org/users/Hotboards/code/Hotboards_EventKeypad/
Dependencies: Hotboards_keypad mbed
Fork of Hotboards_EventKeypad by
Revision 2:252f5ac72f2d, committed 2016-05-30
- Comitter:
- icserny
- Date:
- Mon May 30 10:08:56 2016 +0000
- Parent:
- 1:88d227ecb9b3
- Commit message:
- First version;
Changed in this revision
Hotboards_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 |
diff -r 88d227ecb9b3 -r 252f5ac72f2d Hotboards_keypad.lib --- a/Hotboards_keypad.lib Tue Mar 08 21:23:41 2016 +0000 +++ b/Hotboards_keypad.lib Mon May 30 10:08:56 2016 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/Hotboards/code/Hotboards_keypad/#e870110f753b +http://developer.mbed.org/users/icserny/code/Hotboards_keypad/#c88c922efd74
diff -r 88d227ecb9b3 -r 252f5ac72f2d main.cpp --- a/main.cpp Tue Mar 08 21:23:41 2016 +0000 +++ b/main.cpp Mon May 30 10:08:56 2016 +0000 @@ -1,4 +1,7 @@ /* @file Hotboards_keypad.cpp + || @version 1.2 + || @modified by Istvan Cserny + || @contact https://developer.mbed.org/users/icserny/ || @version 1.1 || @modified by Diego (http://hotboards.org) || @author Alexander Brevig @@ -6,7 +9,10 @@ || || @description || | Demonstrates using the KeypadEvent. - + || + || Hardware requirements: + || - FRDM-KL25Z board + || - 4x4 keypad connected to PTB8,9,10,11 and PTE2,3,4,5 */ #include "mbed.h" #include "Hotboards_keypad.h" @@ -22,9 +28,9 @@ }; // Defines the pins connected to the rows -DigitalInOut rowPins[ 4 ] = { PA_6 , PA_7 , PB_6 , PC_7 }; +DigitalInOut rowPins[ 4 ] = { PTB8 , PTB9 , PTB10 , PTB11 }; // Defines the pins connected to the cols -DigitalInOut colPins[ 4 ] = { PA_8 , PB_10 , PB_4 , PB_5 }; +DigitalInOut colPins[ 4 ] = { PTE2 , PTE3 , PTE4 , PTE5 }; // Creates a new keyboard with the values entered before Keypad kpd( makeKeymap( keys ) , rowPins , colPins , 4 , 4 );