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
Diff: Hotboards_keypad.cpp
- Revision:
- 3:c88c922efd74
- Parent:
- 2:e870110f753b
--- 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); + } }