/ PB_Gherkin / kb.py
kb.py
 1  # SPDX-FileCopyrightText: 2022 Eva Herrada for Adafruit Industries
 2  # SPDX-License-Identifier: MIT
 3  
 4  import board
 5  
 6  from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
 7  from kmk.matrix import DiodeOrientation
 8  
 9  # For PB Gherkin (version with no LEDs and where switches can be mounted in 4 orientations)
10  # and Adafruit KB2040
11  
12  
13  class KMKKeyboard(_KMKKeyboard):
14      row_pins = (board.D10, board.MOSI, board.MISO, board.SCK, board.A0)
15      col_pins = (
16          board.D3,
17          board.D4,
18          board.D5,
19          board.D6,
20          board.D7,
21          board.D8,
22      )
23      diode_orientation = DiodeOrientation.COLUMNS
24      i2c = board.I2C