KEYPAD var, int, r1, r2, r3, r4, c1, c2, c3[, c4]
‘var’ is a variable that will be updated with the key code.
‘int’ is the label of the interrupt to call when a new key press has been detected.
r1, r2, r3 and r4 are the pin numbers used for the four row connections to the keypad. Note that these must be pulled up to 3.3V by individual 10K resistors (see the diagram below).
c1, c2, c3 and c4 are the column connections. c4 is only used with 4×4 keypads and should be omitted if you are using a 4×3 keypad.
Leave a Reply