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

This commit is contained in:
Josh Klar committed 2018-09-02 20:07:07 -07:00
1 parent 6de723c376
commit e9d448af44
17 files changed
+303

No files matched your search

+26
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)