Fork without short circuits
Fork of keypad by
No extra hardware is needed besides the wires and switches. The columns are outputs configured with open drain. The rows are inputs configured with pull up resistors. A key press pulls down its row. With scanning the column is determined thereafter.
See SaveKeypad for an example usage.
Diff: keypad.cpp
- Revision:
- 14:f6c3647bf421
- Parent:
- 13:fb6929fac0db
- Child:
- 15:873a9a452ef1
diff -r fb6929fac0db -r f6c3647bf421 keypad.cpp --- a/keypad.cpp Sun Nov 04 09:49:35 2012 +0000 +++ b/keypad.cpp Sun Nov 04 09:53:46 2012 +0000 @@ -125,3 +125,4 @@ if (position >= 0) _input.call(position); } +