0

I'm using membrane keypad with raspberry pi, and with the help from pad4pi library.

I can't seem to find the interrupt command in pad4pi library.

What's the interrupt command for any of the keys, i.e. one of the key pressed interrupts the running program?

tlfong01
  • 4,665
  • 3
  • 10
  • 24
Shawn Khoo
  • 19
  • 2

1 Answers1

-1

Question

How come there is no interrupt command in the Pad4pi keypad library?


Answer

Well, you don't need to write pin interrupt functions yourself.

The python module will setup interrupt pins during start up and interchanging row and columns as interrupt/input and output rows and columns. Everything is done in the background.

You might like to read my answer for more details of the keypad scanning algorithm to the question in Ref 3.

Note the "Is interrupt flag set condition" in Step 2 of the keypad scanning flowchart.


References

(1) Pad4pi - An interrupt based Python library for reading matrix keypad Raspberry Pi GPIO pins.

(2) AdaFruit Membrane 3x4 Matrix Keypad - $4

(3) Multiple GPIO Buttons


Appendices

Appendix A - MicroChip Keypad Scanning Algorithm - MicroChip

keypad scan method

.END

tlfong01
  • 4,665
  • 3
  • 10
  • 24