A basic 2x2 matrix that can auto-flash to a Feather with a compatible bootloader
This commit is contained in:
26
boards/klardotsh/twotwo_matrix_feather.py
Normal file
26
boards/klardotsh/twotwo_matrix_feather.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import board
|
||||
import time
|
||||
|
||||
from kmk.circuitpython.matrix import MatrixScanner
|
||||
from kmk.common.consts import DiodeOrientation
|
||||
from kmk.common.keymap import Keymap
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
cols = (board.A4, board.A5)
|
||||
rows = (board.D27, board.A6)
|
||||
|
||||
matrix = MatrixScanner(
|
||||
cols=cols, rows=rows,
|
||||
diode_orientation=DiodeOrientation.COLUMNS,
|
||||
)
|
||||
|
||||
keymap = Keymap([
|
||||
['A', 'B'],
|
||||
['C', 'D'],
|
||||
])
|
||||
|
||||
while True:
|
||||
keymap.parse(matrix.raw_scan())
|
||||
# Yield to the controller to allow things like the REPL to take over
|
||||
time.sleep(0.001)
|
Reference in New Issue
Block a user