Closed scndthe2nd closed 2 years ago
There are a couple of errors in your configuration.
There's no positional argument to go
because you didn't instanciate the keyboard object, but calling the method from the class definition. That's not the only issue in the code, though.
The matrix channel would be a good place to get help fixing your config first.
Closing as I saw this was a keymap problem, and not a KMK problem, as well as being discussed in matrix/discord. Feel free to reopen if this is actually a KMK issue.
Using the examples provided for Shift Register Scanner, the scanner fails, requesting 1 positional argument on 'go'. This argument is not requested with the keypad matrix or key scanner.
Tested on 2022/04/14 using latest build on kb2040 using 74HC597 PISO. ` print("Starting")
import board
from kmk.kmk_keyboard import KMKKeyboard from kmk.keys import KC from kmk.scanners.keypad import ShiftRegisterKeys import time import neopixel
from kmk.scanners import DiodeOrientation keyboard = KMKKeyboard()
class keyboard(KMKKeyboard): def init(self):
create and register the scanner
keyboard.keymap = [ ["SW0", "SW1", "SW2", "SW3", "SW4", "SW5", "SW6", "SW7"], ]
KMKKeyboard.debug_enabled = True
pixel = neopixel.NeoPixel(board.NEOPIXEL, 1)
pixel.brightness = 0.01
if name == 'main': keyboard.go()
while True: pixel.fill((0, 0, 0)) `