code.py
1 # SPDX-FileCopyrightText: 2022 Dan Halbert for Adafruit Industries 2 # 3 # SPDX-License-Identifier: MIT 4 5 import keypad 6 import board 7 8 km = keypad.KeyMatrix( 9 row_pins=(board.A0, board.A1, board.A2, board.A3), 10 column_pins=(board.D0, board.D1, board.D2), 11 ) 12 13 while True: 14 event = km.events.get() 15 if event: 16 print(event)