We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import adafruit_matrixkeypad import adafruit_pcf8574 from digitalio import DigitalInOut import board import time # Using default i2c with board.SDA e board.SCL i2c = board.I2C() pcf = adafruit_pcf8574.PCF8574(i2c, 0x20) # Classic 3x4 matrix keypad # I directly soldered the pcf8574 module on the keypad # with pinout C2 R1 C1 R4 C3 R3 R2 cols = [pcf.get_pin(4), pcf.get_pin(6), pcf.get_pin(2)] rows = [pcf.get_pin(5), pcf.get_pin(0), pcf.get_pin(1), pcf.get_pin(3)] keys = ((1, 2, 3), (4, 5, 6), (7, 8, 9), ('*', 0, '#')) keypad = adafruit_matrixkeypad.Matrix_Keypad(rows, cols, keys) while True: keys = keypad.pressed_keys if keys: print("Pressed: ", keys) time.sleep(0.1)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Matrix Keypad
Using I2C Port Expander With Matrix Keypad
The text was updated successfully, but these errors were encountered: