Sense keypresses from a 4x4 keypad A derivative ot he Hotboard_keypad library
Dependents: 26_Hotboards_MultiKey 26_Hotboards_EventKeypad
Fork of Hotboards_keypad by
Revision 3:c88c922efd74, committed 2016-05-30
- Comitter:
- icserny
- Date:
- Mon May 30 09:30:12 2016 +0000
- Parent:
- 2:e870110f753b
- Commit message:
- Changes in v1.2:; 1. i < LIST_MAX in for cycle instead of i <= LIST_MAX; 2. Adaptation for KL25z; 3. Use internal pullup in the library;
Changed in this revision
| Hotboards_keypad.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Hotboards_keypad.cpp Fri Mar 04 02:37:55 2016 +0000
+++ b/Hotboards_keypad.cpp Mon May 30 09:30:12 2016 +0000
@@ -93,6 +93,7 @@
// Re-intialize the row pins. Allows sharing these pins with other hardware.
for (uint8_t c=0; c<sizeKpd.columns; c++) {
columnPins[c].input();
+ columnPins[c].mode(PullUp);
}
// bitMap stores ALL the keys that are being pressed.
@@ -105,6 +106,8 @@
// Set pin to high impedance input. Effectively ends column pulse.
rowPins[r].write( 1 );
rowPins[r].input();
+ rowPins[r].mode(PullUp);
+
}
}
