A basic 2x2 matrix that can auto-flash to a Feather with a compatible bootloader

This commit is contained in:
Josh Klar
2018-09-02 20:06:53 -07:00
parent 6de723c376
commit e9d448af44
17 changed files with 303 additions and 0 deletions

View 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)