Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added hackpads/BluPad/CAD/BluPad Base.stl
Binary file not shown.
Binary file added hackpads/BluPad/CAD/BluPad Top.stl
Binary file not shown.
46 changes: 46 additions & 0 deletions hackpads/BluPad/Firmware/code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# You import all the IOs of your board
import board

# These are imports from the kmk library
from kmk.kmk_keyboard import KMKKeyboard
from kmk.scanners.keypad import KeysScanner
from kmk.keys import KC
from kmk.modules.macros import Press, Release, Tap, Macros

# This is the main instance of your keyboard
keyboard = KMKKeyboard()

# Add the macro extension
macros = Macros()
keyboard.modules.append(macros)

# Define your pins here!
keyboard.pins_col = [board.GPIO2, board.GPIO4, board.GPIO03]
keyboard.pins_row = [board.GPIO6, board.GPIO7, board.GPIO0]

# Tell kmk we are not using a key matrix
keyboard.matrix = KeysScanner(
keyboard=PINS,
value_when_pressed=False,
)

# Here you define the buttons corresponding to the pins
# Look here for keycodes: https://github.com/KMKfw/kmk_firmware/blob/main/docs/en/keycodes.md
# And here for macros: https://github.com/KMKfw/kmk_firmware/blob/main/docs/en/macros.md
keyboard.keymap = [
KC.1,
KC.2,
KC.3,
KC.4,
KC.5,
KC.6,
KC.7,
KC.8,
KC.SPACE,
KC.0,
MEDIA.MUTE
]

# Start kmk!
if __name__ == '__main__':
keyboard.go()
Loading