Skip to content

Instantly share code, notes, and snippets.

@enlavin
Last active August 19, 2022 06:23
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save enlavin/9406429a4d74b8a5a4d4a0cc15bd1feb to your computer and use it in GitHub Desktop.
Save enlavin/9406429a4d74b8a5a4d4a0cc15bd1feb to your computer and use it in GitHub Desktop.
KMK circuitpython macropad firmware
import board
#from kmk.kmk_keyboard import KMKKeyboard
#from kmk.matrix import DiodeOrientation
#from kmk.keys import KC
# Updated to be compatible with the latest KMK release (which requires CircuitPython >= 7.0)
from kmk.kmk_keyboard import KMKKeyboard
from kmk.keys import KC
from kmk.scanners import DiodeOrientation
keyboard = KMKKeyboard()
keyboard.col_pins = (board.GP2, board.GP3, board.GP4, board.GP5)
keyboard.row_pins = (
board.GP21,
board.GP20,
)
keyboard.diode_orientation = DiodeOrientation.COLUMNS
#keyboard.debug_enabled = True
keyboard.keymap = [
[KC.F13, KC.F14, KC.F15, KC.F16, KC.F17, KC.F18, KC.F19, KC.F20],
]
if __name__ == '__main__':
keyboard.go()
@Slyke
Copy link

Slyke commented Feb 15, 2021

@kaladinstorm84
Copy link

Any chance of a walkthrough on how to wire the hardware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment